Class: UiBibz::Ui::Ux::Tables::Paginable

Inherits:
Base
  • Object
show all
Includes:
WillPaginate::ActionView
Defined in:
lib/ui_bibz/ui/ux/tables/extensions/paginable.rb

Instance Attribute Summary

Attributes inherited from Base

#output_buffer

Instance Method Summary collapse

Methods inherited from Base

#generate_id, #i18n_set?, #inject_url

Constructor Details

#initialize(store, options, html_options = nil) ⇒ Paginable

Returns a new instance of Paginable.



7
8
9
10
11
# File 'lib/ui_bibz/ui/ux/tables/extensions/paginable.rb', line 7

def initialize(store, options, html_options = nil)
  @store        = store
  @options      = options
  @html_options = html_options
end

Instance Method Details

#paginable?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ui_bibz/ui/ux/tables/extensions/paginable.rb', line 21

def paginable?
  @options[:paginable].nil? ? true : @options[:paginable]
end

#renderObject

Render html tag



14
15
16
17
18
19
# File 'lib/ui_bibz/ui/ux/tables/extensions/paginable.rb', line 14

def render
   :div, @html_options do
    concat UiBibz::Ui::Ux::Tables::TablePagination.new(store: @store, wrap_form: @options[:wrap_form]).render
    concat UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(store: @store, wrap_form: @options[:wrap_form]).render
  end
end