Class: Sunrise::Views::FormBuilder
- Inherits:
-
SimpleForm::FormBuilder
- Object
- SimpleForm::FormBuilder
- Sunrise::Views::FormBuilder
- Includes:
- ActionView::Helpers::JavaScriptHelper, ActionView::Helpers::TagHelper
- Defined in:
- lib/sunrise/views/form_builder.rb
Instance Method Summary collapse
Instance Method Details
#globalize(options = {}) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/sunrise/views/form_builder.rb', line 21 def globalize( = {}) locales = [:locales] || Sunrise.available_locales html = [] html.join.html_safe end |
#input(attribute_name, options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/sunrise/views/form_builder.rb', line 12 def input(attribute_name, = {}, &block) [:input_html] ||= {} [:input_html] = { class: 'text' }.merge([:input_html]) attribute_name = "#{attribute_name}_#{[:locale]}" if [:locale].present? super(attribute_name, , &block) end |