RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: arturaugusto
I created a migration to add a position:integer field, used a hidden_field inside partial with :class => 'position' and included this line of js before event.preventDefault() to the .add_fields event: > $(this).prev().find('.position').val(time)
and on has_many association, i used
has_many :posts, :order => "position"
I created a migration to add a position:integer field, used a hidden_field inside partial with :class => 'position' and included this line of js before event.preventDefault() to the .add_fields event:
> $(this).prev().find('.position').val(time)
and on has_many association, i used