Skip to content

Allow different defaults #2

@george-carlin

Description

@george-carlin

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions