This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in app/helpers | |
class DefaultFormBuilder < ActionView::Helpers::FormBuilder | |
# Example of an added method that wraps custom textfields, where type can be | |
# :email_field, :text_field, etc. | |
def textfield(type, method, attributes = {}) | |
@template.content_tag :div, class: 'textfield' do | |
@template.send(type, @object_name, method, objectify_options(attributes)) | |
end | |
end | |