Class: NextPage::Configuration
- Inherits:
-
Object
- Object
- NextPage::Configuration
- Defined in:
- lib/next_page/configuration.rb
Overview
Configuration
Class Configuration stores the following settings:
-
sort_scope_prefix
-
sort_scope_suffix
Sort Scope Prefix
Enables client to sort request to be mapped to a scope with a more specific name. For example, given a derived attribute named status, the query parameter can be sort=status but would map to a more explicitly named scope, such as sort_by_status (assuming the sort_scope_prefix value is ‘sort_by_’).
Sort Scope Suffix
Enables client to sort request to be mapped to a scope with a more specific name. For example, given a derived attribute named status, the query parameter can be sort=status but would map to a more explicitly named scope, such as status_sort (assuming the sort_scope_suffix value is ‘_sort’).
Instance Attribute Summary collapse
-
#sort_scope_prefix ⇒ Object
Returns the value of attribute sort_scope_prefix.
-
#sort_scope_suffix ⇒ Object
Returns the value of attribute sort_scope_suffix.
Instance Method Summary collapse
Instance Attribute Details
#sort_scope_prefix ⇒ Object
Returns the value of attribute sort_scope_prefix.
20 21 22 |
# File 'lib/next_page/configuration.rb', line 20 def sort_scope_prefix @sort_scope_prefix end |
#sort_scope_suffix ⇒ Object
Returns the value of attribute sort_scope_suffix.
20 21 22 |
# File 'lib/next_page/configuration.rb', line 20 def sort_scope_suffix @sort_scope_suffix end |
Instance Method Details
#sort_scope_prefix? ⇒ Boolean
26 27 28 |
# File 'lib/next_page/configuration.rb', line 26 def sort_scope_prefix? @sort_scope_prefix.present? end |
#sort_scope_suffix? ⇒ Boolean
34 35 36 |
# File 'lib/next_page/configuration.rb', line 34 def sort_scope_suffix? @sort_scope_suffix.present? end |