[Rails] Re: [Constant Reloading] Where is the right place to put MyCustomFormBuilder?

2015-01-15 Thread Andrey Nering
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

[Rails] Re: [Constant Reloading] Where is the right place to put MyCustomFormBuilder?

2015-01-15 Thread Frederick Cheung
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