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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user