Module: GenericFormFor::Inputs::Base::Placeholder

Included in:
Number, String
Defined in:
lib/generic_form_for/inputs/base/placeholder.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



6
7
8
9
10
11
# File 'lib/generic_form_for/inputs/base/placeholder.rb', line 6

def input_html_options
  # merge it on top of everything
  super.merge({
    :placeholder => placeholder_text
  })
end

#placeholder_textObject



13
14
15
# File 'lib/generic_form_for/inputs/base/placeholder.rb', line 13

def placeholder_text
  translate_placeholder(options[:placeholder])
end