Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different defaults #2

Open
george-carlin opened this issue Dec 28, 2014 · 0 comments
Open

Allow different defaults #2

george-carlin opened this issue Dec 28, 2014 · 0 comments

Comments

@george-carlin
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant