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"=>"<p>asdfasdfasd sadf asdf asdf asdf asdf</p>"}
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