Class: Locomotive::SmallCodeInput

Inherits:
Formtastic::Inputs::TextInput
  • Object
show all
Defined in:
app/inputs/locomotive/small_code_input.rb

Instance Method Summary collapse

Instance Method Details

#error_anchorObject



17
18
19
# File 'app/inputs/locomotive/small_code_input.rb', line 17

def error_anchor
  template.(:span, '', class: 'error-anchor')
end

#input_wrapping(&block) ⇒ Object



10
11
12
13
14
15
# File 'app/inputs/locomotive/small_code_input.rb', line 10

def input_wrapping(&block)
  template.(:li,
    [template.capture(&block), error_html, error_anchor, hint_html].join("\n").html_safe,
    wrapper_html_options
  )
end

#wrapper_html_optionsObject



4
5
6
7
8
# File 'app/inputs/locomotive/small_code_input.rb', line 4

def wrapper_html_options
  super.tap do |opts|
    opts[:class] += ' code small'
  end
end