Populate fckeditor using form_for and fields_for with 2 models and namespace

I am using the form below. text_html in the form defaults to the
value of @text_html.text.html defined in the action. The textarea
does not. How do I populate the text area with @text_html.text.html?
Note I am using a namespace in form_for.

When I submit the form the it submits:

“admin”=>{“text_html”=>“

asdfasdfasd sadf asdf asdf asdf asdf

”}

My form:

<%= javascript_include_tag :fckeditor %>

<% form_for([:namespace,:admin], :url => { :action => :update ,:id =>
@client.permalink}) do |form| %>

  <% fields_for :title do |t| %>
   <%= t.text_field :title %><br/>
   <% end %>

  <% fields_for :text_html do |th| %>
   <%= th.text_field :text_html %><br/>
   <%= fckeditor_textarea("admin", "text_html", :toolbarSet =>
       "Basic", :width => "600", :height => "600px") %>
   <% end %>

  <%= submit_tag 'Save',:class => "submit" %>

<% end %>

Many thanks,

Mike

Well

   <%= fckeditor_textarea(:text_html, :text_html, :toolbarSet =>
       "Basic", :width => "600", :height => "600px") %>

works. I tried this first. Not sure why it works now. Grr.

Mike

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs