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

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

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -