class Sunrise::Views::FormBuilder
Public Instance Methods
globalize(options = {})
click to toggle source
# File lib/sunrise/views/form_builder.rb, line 21 def globalize(options = {}) locales = options[:locales] || Sunrise.available_locales html = [] html.join.html_safe end
input(attribute_name, options = {}, &block)
click to toggle source
Calls superclass method
# File lib/sunrise/views/form_builder.rb, line 12 def input(attribute_name, options = {}, &block) options[:input_html] ||= {} options[:input_html] = { class: 'text' }.merge(options[:input_html]) attribute_name = "#{attribute_name}_#{options[:locale]}" if options[:locale].present? super(attribute_name, options, &block) end
Protected Instance Methods
object_plural()
click to toggle source
# File lib/sunrise/views/form_builder.rb, line 30 def object_plural object_name.to_s.pluralize end