Class: UiBibz::Ui::Ux::Tables::Searchable
- Defined in:
- lib/ui_bibz/ui/ux/tables/extensions/searchable.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(store, options, html_options = nil) ⇒ Searchable
constructor
A new instance of Searchable.
-
#render ⇒ Object
Render html tag.
- #searchable? ⇒ Boolean
Methods inherited from Base
#generate_id, #i18n_set?, #inject_url
Constructor Details
#initialize(store, options, html_options = nil) ⇒ Searchable
Returns a new instance of Searchable.
5 6 7 8 9 |
# File 'lib/ui_bibz/ui/ux/tables/extensions/searchable.rb', line 5 def initialize(store, , = nil) @store = store @options = @html_options = end |
Instance Method Details
#render ⇒ Object
Render html tag
12 13 14 15 16 17 18 |
# File 'lib/ui_bibz/ui/ux/tables/extensions/searchable.rb', line 12 def render content_tag :div, @html_options do concat content_tag(:div, table_name, class: 'title') concat TableSearchField.new({ store: @store, wrap_form: @options[:wrap_form] }).render if searchable? concat tag :br, class: 'ui-bibz-clear' end end |
#searchable? ⇒ Boolean
20 21 22 |
# File 'lib/ui_bibz/ui/ux/tables/extensions/searchable.rb', line 20 def searchable? @options[:searchable].nil? ? true : @options[:searchable] end |