Class: SmartTable::SmartTableConcern::Params
- Inherits:
-
Object
- Object
- SmartTable::SmartTableConcern::Params
- Defined in:
- app/controllers/concerns/smart_table/smart_table_concern.rb
Instance Attribute Summary collapse
-
#page_number ⇒ Object
Returns the value of attribute page_number.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#remote ⇒ Object
Returns the value of attribute remote.
-
#search ⇒ Object
Returns the value of attribute search.
-
#sort ⇒ Object
Returns the value of attribute sort.
Instance Method Summary collapse
-
#initialize ⇒ Params
constructor
A new instance of Params.
- #limit ⇒ Object
- #offset ⇒ Object
Constructor Details
#initialize ⇒ Params
Returns a new instance of Params.
13 14 15 16 17 18 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 13 def initialize self.sort = nil self.page_size = nil self.page_number = 1 self.search = nil end |
Instance Attribute Details
#page_number ⇒ Object
Returns the value of attribute page_number.
11 12 13 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 11 def page_number @page_number end |
#page_size ⇒ Object
Returns the value of attribute page_size.
11 12 13 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 11 def page_size @page_size end |
#remote ⇒ Object
Returns the value of attribute remote.
11 12 13 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 11 def remote @remote end |
#search ⇒ Object
Returns the value of attribute search.
11 12 13 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 11 def search @search end |
#sort ⇒ Object
Returns the value of attribute sort.
11 12 13 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 11 def sort @sort end |
Instance Method Details
#limit ⇒ Object
20 21 22 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 20 def limit page_size end |
#offset ⇒ Object
24 25 26 |
# File 'app/controllers/concerns/smart_table/smart_table_concern.rb', line 24 def offset page_size * (page_number-1) if page_size end |