Displaying 2 results from an estimated 2 matches for "content_tag_for".
2006 Jun 16
1
sortable acts_as_tree with heirarchy
I''ve been stumbling on the tut at oriontransfer
(http://wiki.oriontransfer.co.nz/main/show/SortableTree)
I''ve got it working in a one dimensional list and I''ve got the drag and
drop working on children, but as can''t get it to save the tree.
Here''s my view:
<h2>Menu Prototype 2</h2>
<%= flash[:notice] %>
<ul
2012 Jul 20
8
sti_object.becomes(Parent) unexpectedly mutating the receiver
...;'s type attribute will
be changed to the class it becomes, or should becomes be changed so that it
doesn''t automatically mutate the receiver? Either option would be an easy
fix, though the latter would break backwards compatibility. I am using
becomes with things like form_for and content_tag_for so I''m using the new
object returned by becomes as opposed to the mutated object.
Here''s an example of the undocumented behavior I was seeing:
class Parent < ActiveRecord::Base
end
class Child < Parent
end
child = Child.new
child.type # => ''Child''
n...