Class: Jobshop::Builder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Defined in:
app/builders/jobshop/builder.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#button(value = nil, *args) ⇒ Object



27
28
29
30
31
32
# File 'app/builders/jobshop/builder.rb', line 27

def button(value = nil, *args)
  button_classes = [ "mdl-button", "mdl-js-button", "mdl-button--raised",
    "mdl-button--colored", "mdl-js-ripple-effect" ]

  super(value, class: button_classes)
end

#check_box(field, *args) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'app/builders/jobshop/builder.rb', line 16

def check_box(field, *args)
  output = ""
  output += label(field, class: [ "mdl-checkbox", "mdl-js-checkbox", "mdl-js-ripple-effect" ]) do
    content  = ""
    content += super(field, class: [ "mdl-checkbox__input" ])
    content += @template.(:span, field.to_s.humanize, class: [ "mdl-checkbox__label" ])
    content.html_safe
  end
  output.html_safe
end