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 = {}, &block) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/sunrise/views/form_builder.rb', line 19 def globalize(={}, &block) locales = [:locales] || Sunrise.available_locales html = [] html.join.html_safe end |
#input(attribute_name, options = {}, &block) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/sunrise/views/form_builder.rb', line 10 def input(attribute_name, = {}, &block) [:input_html] ||= {} [:input_html] = {:class => 'text'}.merge([:input_html]) attribute_name = "#{attribute_name}_#{[:locale]}" unless [:locale].blank? super(attribute_name, , &block) end |