Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration with existing ruby on rails app #1

Open
FrankBechstein opened this issue Jun 19, 2010 · 2 comments
Open

integration with existing ruby on rails app #1

FrankBechstein opened this issue Jun 19, 2010 · 2 comments

Comments

@FrankBechstein
Copy link

Hello,

I tried to integrated your plugin into my ruby on rails applications admin interface.

<h2>Neuer Bericht</h2>

<%- form_tag 'new_blog' do -%>
<p><label for="all_blog_title">Titel:</label> <%= text_field 'all_blog', 'title' %> </p>
<p><label for="all_blog_url">Url:</label> <%= text_field 'all_blog', 'url' %> </p>
<p><label for="all_blog_seo_tag">Tags:</label> <%= text_field 'all_blog', 'seo_tag' %> </p>
<p><label for="all_blog_topic">Topic:</label> <%= text_field 'all_blog', 'topic' %> </p>
<p><label for="all_blog_inhalt">Inhalt:</label> <%= text_area 'all_blog', 'inhalt' %> </p>
<p><label for="all_blog_vorschau">Vorschau</label> <%= text_area 'all_blog', 'vorschau' %> </p>
<p><label for="all_blog_link">Link:</label> <%= text_field 'all_blog', 'link' %> </p>
<p><label for="all_blog_download_link">Download Link:</label> <%= text_field 'all_blog', 'download_link' %> </p>
  <%= text_area :post, :class => 'rich_text_editor' %>
<p><%= submit_tag 'Speichern' %></p>
<%- end -%>"

and

 class AdminController < ApplicationController
uses_yui_editor

But it doesn't semm to regonize the TextArea.

@larsklevan
Copy link
Owner

Did you include this in your <head>?
<%= include_yui_editor_if_used %>

@FrankBechstein
Copy link
Author

I did include it in the head section.

here is my new_blog method from the class AdminController:

public
def new_blog
  case request.method
    when :post
    params[:all_blog][:date] = Time.now.to_formatted_s :mysql
    Blog.create params[:all_blog]
    redirect_to :action => "all_blog"
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants