Class: Component::Form::Cell

Inherits:
Cell
  • Object
show all
Defined in:
app/cells/lato_view/component/form/cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url: '', method: :post, remote: false, multipart: false, custom_class: '') ⇒ Cell

Returns a new instance of Cell.



6
7
8
9
10
11
12
13
14
15
# File 'app/cells/lato_view/component/form/cell.rb', line 6

def initialize(url: '', method: :post, remote: false, multipart: false, custom_class: '')
 # save params
  @url = url
  @method = method
  @remote = remote
  @multipart = multipart
  @custom_class = custom_class
  # check params
  check_params
end

Instance Attribute Details

#custom_classObject

Returns the value of attribute custom_class.



4
5
6
# File 'app/cells/lato_view/component/form/cell.rb', line 4

def custom_class
  @custom_class
end

#methodObject

Returns the value of attribute method.



4
5
6
# File 'app/cells/lato_view/component/form/cell.rb', line 4

def method
  @method
end

#multipartObject

Returns the value of attribute multipart.



4
5
6
# File 'app/cells/lato_view/component/form/cell.rb', line 4

def multipart
  @multipart
end

#remoteObject

Returns the value of attribute remote.



4
5
6
# File 'app/cells/lato_view/component/form/cell.rb', line 4

def remote
  @remote
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'app/cells/lato_view/component/form/cell.rb', line 4

def url
  @url
end

Instance Method Details

#closeObject



25
26
27
# File 'app/cells/lato_view/component/form/cell.rb', line 25

def close
  '</form>'
end

#openObject



21
22
23
# File 'app/cells/lato_view/component/form/cell.rb', line 21

def open
  render 'open.html'
end

#showObject



17
18
19
# File 'app/cells/lato_view/component/form/cell.rb', line 17

def show
  render 'show.html'
end