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

@@ -6,6 +6,7 @@ class ApplicationController < ActionController::Base
include HasOrders
include AccessDeniedHandler
default_form_builder ConsulFormBuilder
protect_from_forgery with: :exception
before_action :authenticate_http_basic, if: :http_basic_auth_site?