Sha256: b0a2f0ecd0dd0d846a8956dd6b42e96c36b2bfadcae09182ce85ff4884d4df55
Contents?: true
Size: 490 Bytes
Versions: 17
Compression:
Stored size: 490 Bytes
Contents
module Locomotive class SubdomainInput < Formtastic::Inputs::TextInput def wrapper_html_options super.tap do |opts| opts[:class] += ' path' end end def to_html domain = options.delete(:domain) input_wrapping do label_html << template.content_tag(:em, "http://") << builder.text_field(method, input_html_options) << template.content_tag(:em, ".#{domain}", :class => 'error-anchor') end end end end
Version data entries
17 entries across 17 versions & 2 rubygems