module SimpleForm::Components::Placeholders

Needs to be enabled in order to do automatic lookups.

Public Instance Methods

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