I have a custom form builder for my application:
file location: /lib/ruby/app_form_builder.rb
class ActionView::Helpers::AppFormBuilder < ActionView::Helpers::FormBuilder
I am requiring it in an initializer:
ActionView::Base.default_form_builder = ActionView::Helpers::AppFormBuilder
This works, but I have to restart the server on every change. I was reading the Constant Guide, but didn’t find the right way to made this file to be automaticaly reloaded. I tried to put this in /app/helpers forlder and making it default in application.rb, but I got “unitialized constant” error.
Also, I would like to know if Rails can reload code that modify native Ruby classes: