mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
60f7d49033
When `before_action :callback, only: :action_name` is declared on a controller that doesn't respond to `action_name`, raise an exception at request time. This is a safety measure to ensure that typos or forgetfulness don't prevent a crucial callback from being run when it should. Include names of filters for more useful error messages The error message of the raised exception will be more useful if it indicates the names of the callbacks that have the missing conditinoal action. The way the callbacks get shoehorned into `_normalize_callback_options` options parameter is a little awkward, but done this way to avoid changing the method's signature, since it is a publicly documented method. |
||
---|---|---|
.. | ||
callbacks_test.rb | ||
collector_test.rb | ||
translation_test.rb |