I have two models in a has_many relationship such that Log has_many Items. Rails then nicely sets up things like: some_log.items which returns all of the associ
some_log.items
class Item < ActiveRecord::Base default_scope { order('some_col DESC') } end
This can also be written with an alternate syntax:
default_scope { order(some_col: :desc) }