aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/form_options_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/helpers/form_options_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/form_options_helper.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb
index 2ecba2e337..2b9d55a019 100644
--- a/actionview/lib/action_view/helpers/form_options_helper.rb
+++ b/actionview/lib/action_view/helpers/form_options_helper.rb
@@ -806,13 +806,11 @@ module ActionView
end
def public_or_deprecated_send(item, value)
- begin
- item.public_send(value)
- rescue NoMethodError
- raise unless item.respond_to?(value, true) && !item.respond_to?(value)
- ActiveSupport::Deprecation.warn "Using private methods in view's helpers is deprecated"
- item.send(value)
- end
+ item.public_send(value)
+ rescue NoMethodError
+ raise unless item.respond_to?(value, true) && !item.respond_to?(value)
+ ActiveSupport::Deprecation.warn "Using private methods from view helpers is deprecated (calling private #{item.class}##{value})"
+ item.send(value)
end
def prompt_text(prompt)