Module: Plutonium::Definition::Sorting
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/plutonium/definition/sorting.rb
Constant Summary collapse
- DEFAULT_SORT =
The framework-wide default sort: newest first.
A SENTINEL, compared with
equal?— see Definition::Positioning, which only claims default_sort while nobody has chosen one.==cannot answer that question:default_sort :id, :descbuilds a fresh[field, direction]array that is value-equal to this one, so an app that explicitly asked for newest-first would have its choice silently overwritten. Identity distinguishes them, which is why the installation below assigns this exact object rather than going throughdefault_sort. [:id, :desc].freeze
Instance Method Summary collapse
Instance Method Details
#default_sort ⇒ Object
43 44 45 |
# File 'lib/plutonium/definition/sorting.rb', line 43 def default_sort self.class._default_sort end |