Class: Locomotive::SubdomainInput

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

Instance Method Summary collapse

Instance Method Details

#to_htmlObject



10
11
12
13
14
15
16
17
18
19
# File 'app/inputs/locomotive/subdomain_input.rb', line 10

def to_html
  domain = options.delete(:domain)

  input_wrapping do
    label_html <<
    template.(:em, "http://") <<
    builder.text_field(method, input_html_options) <<
    template.(:em, ".#{domain}", :class => 'error-anchor')
  end
end

#wrapper_html_optionsObject



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

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