Inherit from builder instead of monkey patching it

We were monkey-patching FoundationRailsHelper::Formbuilder, which made
form customization difficult. We can inherit from it, which is the
standard way of extending what an existing class does, and make our form
the default one.
This commit is contained in:
Javi Martín
2019-10-03 00:49:28 +02:00
parent 3ea9f3cecf
commit ae6fab9f5e
6 changed files with 20 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
class Management::BaseController < ActionController::Base
include GlobalizeFallbacks
layout "management"
default_form_builder ConsulFormBuilder
before_action :verify_manager
before_action :set_locale