Class: PaginatedTable::DataPage
- Inherits:
-
Object
- Object
- PaginatedTable::DataPage
- Defined in:
- lib/paginated_table/page.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(collection, page) ⇒ DataPage
constructor
A new instance of DataPage.
Constructor Details
#initialize(collection, page) ⇒ DataPage
Returns a new instance of DataPage.
72 73 74 75 |
# File 'lib/paginated_table/page.rb', line 72 def initialize(collection, page) @page = page @data = collection.order(order_clause).paginate(pagination_params) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
70 71 72 |
# File 'lib/paginated_table/page.rb', line 70 def data @data end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
70 71 72 |
# File 'lib/paginated_table/page.rb', line 70 def page @page end |