Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

arturaugusto's Profile

GitHub User: arturaugusto

Comments by

Avatar

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"