I couldn't make this work with "default_form_builder" method.
My solution was using a custom "form_for" method:
# application_helper.rb
def app_form_for(object, options = {})
options.merge!(builder: AppFormBuilder)
form_for object, options do |f|
yield f
end
end
And adding the Builde
On Thursday, January 15, 2015 at 11:51:39 AM UTC, Andrey Nering wrote:
>
> I have a custom form builder for my application:
> I am requiring it in an initializer:
>
> require "#{Rails.root}/lib/ruby/app_form_builder.rb"
> ActionView::Base.default_form_builder = ActionView::Helpers::
> AppFormBuild
2 matches
Mail list logo