-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
E.g. allow for this kind of setup in an initializer file:
OrderOrder.config do |c|
c.default_name_column = "title"
c.default_time_column = "date"
end
Now User.alphabetical will sort by title, not name, negating to need to pass "title" as an argument.
Maybe even allow setting this at the model level? E.g.
class User < ActiveRecord::Base
self.alphabetical_column = "name"
self.chronological_column = "date"
end