On Thursday, January 15, 2015 at 11:51:39 AM UTC, Andrey Nering wrote:
require is never a good idea if you want something to be reloaded. You've also got a clash between the class name and it's location on disk - having the class just be AppFormBuilder in lib/app_form_builder.rb should work.
Lastly if you look into the bowels of action view, the default_form_builder method looks like this
def default_form_builder
builder = ActionView::Base.default_form_builder
builder.respond_to?(:constantize) ? builder.constantize : builder
end
So if you set default_form_builder to be a "AppFormBuilder" then that should allow it to be reloaded.