css - How to make acts_as_list make the added item have the top position? -


i have group of items uses acts_as_list gem. of now, when new item added, acts_as_list give item lowest position, making show last item on list. there way make acts_as_list gives newly added item position number makes show 1st rather last? don't want flip positions of other items though. thanks!

new entries in list by default added bottom. can specify add_new_at option have new entries added @ top:

acts_as_list scope: :object, add_new_at: :top 

hope helps!


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -