From 9b19861ec0954c5bbbd8b71d33439360a0148d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 7 Feb 2017 10:41:44 -0300 Subject: Improve the exception message to direct people to all the possible values --- activesupport/lib/active_support/callbacks.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/callbacks.rb') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index b3d3f3caec..ab37e128e9 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -287,7 +287,8 @@ module ActiveSupport def self.build(chain, filter, kind, options) if filter.is_a?(String) raise ArgumentError, <<-MSG.squish - Passing string to define callback is not supported. Use proc instead. + Passing string to define a callback is not supported. See the `.set_callback` + documentation to see supported values. MSG end -- cgit v1.2.3