Class: Component::Searchbar::Cell

Inherits:
Cell
  • Object
show all
Includes:
Ransack::Helpers::FormHelper
Defined in:
app/cells/lato_view/component/searchbar/cell.rb

Constant Summary collapse

@@styles =
VIEW_COMPONENTSTYLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements: nil, filter: nil, url: nil, method: 'get', style: 'normal', remote: false, custom_class: '') ⇒ Cell

Returns a new instance of Cell.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 12

def initialize(elements: nil, filter: nil, url: nil, method: 'get',
               style: 'normal', remote: false, custom_class: '')
 # save params
  @elements = elements
  @filter = filter
  @url = url
  @method = method
  @style = style
  @remote = remote
  @custom_class = custom_class
  # check params
  check_params
end

Instance Attribute Details

#custom_classObject

Returns the value of attribute custom_class.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def custom_class
  @custom_class
end

#elementsObject

Returns the value of attribute elements.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def elements
  @elements
end

#filterObject

Returns the value of attribute filter.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def filter
  @filter
end

#methodObject

Returns the value of attribute method.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def method
  @method
end

#remoteObject

Returns the value of attribute remote.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def remote
  @remote
end

#styleObject

Returns the value of attribute style.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def style
  @style
end

#urlObject

Returns the value of attribute url.



9
10
11
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 9

def url
  @url
end

Instance Method Details

#showObject



26
27
28
# File 'app/cells/lato_view/component/searchbar/cell.rb', line 26

def show
  render 'show.html'
end