diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-08 18:08:02 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-08 18:08:02 -0200 |
commit | b8e83ce1c57a064cb9506d5ba16cebcf84e0a1e0 (patch) | |
tree | 7b42b37a51624001d2f0233e9df186c43e2ca082 /actionpack/lib | |
parent | 9af5f33a1629f16c56137e2b9903bc977455075f (diff) | |
parent | 9a25603d0aa2d3de35ce59fcfe8b90cdfddb78cf (diff) | |
download | rails-b8e83ce1c57a064cb9506d5ba16cebcf84e0a1e0.tar.gz rails-b8e83ce1c57a064cb9506d5ba16cebcf84e0a1e0.tar.bz2 rails-b8e83ce1c57a064cb9506d5ba16cebcf84e0a1e0.zip |
Merge pull request #18404 from claudiob/rebase-14549
Add test case and documentation for skip_before_filter.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 32de82780f..8571383739 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -28,6 +28,16 @@ module AbstractController # The basic idea is that <tt>:only => :index</tt> gets converted to # <tt>:if => proc {|c| c.action_name == "index" }</tt>. # + # Note that <tt>:only</tt> has priority over <tt>:if</tt> in case they + # are used together. + # + # only: :index, if: -> { true } # the :if option will be ignored. + # + # Note that <tt>:if</tt> has priority over <tt>:except</tt> in case they + # are used together. + # + # except: :index, if: -> { true } # the :except option will be ignored. + # # ==== Options # * <tt>only</tt> - The callback should be run only for this action # * <tt>except</tt> - The callback should be run for all actions except this action |