You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem - Two copies of input values in params, neither of which contain the body attribute (the one given to the helper) when editting a STI instance.
class Document < AR end
class Page < Document end
When creating a new Document everything works as expected, I pass the 'type' in a hidden field.
However when I try and edit a Page (same _form, but now its an instance of Page because the type field has been set) I get params[:document]andparams[:page], but neither hash contain the a [:body] key.
I see no evidence in the source or generated source of any additional inputs being added to the DOM. I see nothing in the helper method that could cause this.
The text was updated successfully, but these errors were encountered:
It seems the duplicated params was Rails related adding: <% form_for @document.becomes(Document) prevented this. As a result I also got the [:body] key back in the hash. All in all not sure why this works but it does.
Problem - Two copies of input values in params, neither of which contain the body attribute (the one given to the helper) when editting a STI instance.
class Document < AR end
class Page < Document end
When creating a new Document everything works as expected, I pass the 'type' in a hidden field.
<%= fckeditor_textarea("document", "body", :toolbarSet => 'Simple', :width => '100%', :height => '200px') %>
However when I try and edit a Page (same _form, but now its an instance of Page because the type field has been set) I get
params[:document]
andparams[:page]
, but neither hash contain the a[:body]
key.I see no evidence in the source or generated source of any additional inputs being added to the DOM. I see nothing in the helper method that could cause this.
The text was updated successfully, but these errors were encountered: