diff options
author | Kevin McPhillips <github@kevinmcphillips.ca> | 2015-04-06 22:20:57 -0400 |
---|---|---|
committer | Kevin McPhillips <github@kevinmcphillips.ca> | 2015-04-13 23:43:34 -0400 |
commit | 2b8acdcd21e61a69eefb5c3ef132995c287c0a8e (patch) | |
tree | a8ba1012769c9203eb176688ad8f59fb33686987 /actionview/lib/action_view/helpers/form_helper.rb | |
parent | efaec3dd63df113c7931f84d6b1d80f26307d93c (diff) | |
download | rails-2b8acdcd21e61a69eefb5c3ef132995c287c0a8e.tar.gz rails-2b8acdcd21e61a69eefb5c3ef132995c287c0a8e.tar.bz2 rails-2b8acdcd21e61a69eefb5c3ef132995c287c0a8e.zip |
Override default form builder for a controller
Diffstat (limited to 'actionview/lib/action_view/helpers/form_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index ece117b547..7fdeca5ea8 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -114,6 +114,8 @@ module ActionView include ModelNaming include RecordIdentifier + attr_internal :default_form_builder + # Creates a form that allows the user to create or update the attributes # of a specific model object. # @@ -1233,7 +1235,7 @@ module ActionView end def default_form_builder_class - builder = ActionView::Base.default_form_builder + builder = default_form_builder || ActionView::Base.default_form_builder builder.respond_to?(:constantize) ? builder.constantize : builder end end |