I have two models:
jacket.rb:
has_many :button
belongs_to :store
button.rb:
belongs_to :jacket
In my store controller, I want to be able to do @store.jackets.order(buttons: :desc), but I cannot do this because it is not a db column. How would I do it?