I have a category with a list of items. The items have a position and the category has a relationship has_many :items, :order => \"position\". When a user updates a position
Rails 4 will update your has_many/belongs_to associated objects for you when they change, but it will not re-run the query which means that even though the items in the category.items will be updated they will not be in order. Depending on the size of your tables you may want to use ruby to order the result or use category.reload to get them in order.
See the RailsGuides at http://guides.rubyonrails.org/association_basics.html and look for inverse_of