Assuming I have two models:
Order “belongs_to :payee”
Payee “has_many :orders”
In the orders table, I store the payee_id.
If I want to pull all orders and display the list alphabetically by the
payees last name, what would be the best way to do it?
Would I need to setup a true “join” table and then run my find on it? I
can’t do this through the view using a sort plugin since that simply
changes the finders SQL and doesn’t include the association logic needed
Since I’m accessing the payee’s name through the association
“order.payee.last_name” what is the best way to accomplish what I need
or do I need to write some convoluted method that breaks down the
recordset and orders it manually?