Class: RoleModelTables::Filters::RansackFilter

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::TagHelper
Defined in:
lib/rolemodel_tables/models/ransack_filter.rb

Overview

Parent class for all custom filters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ransack_matcher, form_options = {}) ⇒ RansackFilter

Returns a new instance of RansackFilter.



13
14
15
16
# File 'lib/rolemodel_tables/models/ransack_filter.rb', line 13

def initialize(ransack_matcher, form_options = {})
  @ransack_matcher = ransack_matcher
  @form_options = form_options
end

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



11
12
13
# File 'lib/rolemodel_tables/models/ransack_filter.rb', line 11

def filter
  @filter
end

#form_optionsObject (readonly)

Returns the value of attribute form_options.



10
11
12
# File 'lib/rolemodel_tables/models/ransack_filter.rb', line 10

def form_options
  @form_options
end

#ransack_matcherObject (readonly)

Returns the value of attribute ransack_matcher.



10
11
12
# File 'lib/rolemodel_tables/models/ransack_filter.rb', line 10

def ransack_matcher
  @ransack_matcher
end

Instance Method Details

#form_row(_form) ⇒ Object



18
19
20
# File 'lib/rolemodel_tables/models/ransack_filter.rb', line 18

def form_row(_form)
  throw 'Subclass must override'
end