module SimpleForm::Components::Placeholders

Needs to be enabled in order to do automatic lookups.

Public Instance Methods

placeholder() click to toggle source
# File lib/simple_form/components/placeholders.rb, line 5
def placeholder
  input_html_options[:placeholder] ||= placeholder_text
  nil
end
placeholder_text() click to toggle source
# File lib/simple_form/components/placeholders.rb, line 10
def placeholder_text
  placeholder = options[:placeholder]
  placeholder.is_a?(String) ? placeholder : translate(:placeholders)
end