diff options
author | claudiob <claudiob@gmail.com> | 2015-01-08 09:30:31 -0800 |
---|---|---|
committer | claudiob <claudiob@gmail.com> | 2015-01-08 09:30:31 -0800 |
commit | 9a25603d0aa2d3de35ce59fcfe8b90cdfddb78cf (patch) | |
tree | f57a8159192e1cb676f6167616a74761c947153d /actionpack/lib/action_controller/metal/flash.rb | |
parent | ae9f803c5dfbc06701de87b804250b591fac2d20 (diff) | |
download | rails-9a25603d0aa2d3de35ce59fcfe8b90cdfddb78cf.tar.gz rails-9a25603d0aa2d3de35ce59fcfe8b90cdfddb78cf.tar.bz2 rails-9a25603d0aa2d3de35ce59fcfe8b90cdfddb78cf.zip |
Add test/doc for :if/:except in skip_before_action
The new test/docs further explain the conflicts that can happen when
mixing `:if`/`:unless` options with `:only`/`:except` options in
`skip_before_action`.
The gist is that "positive" filters always have priority over negative
ones.
The previous commit already showed that `:only` has priority over `:if`.
This commit shows that `:if` has priority over `:except`.
For instance, the following snippets are equivalent:
```ruby
skip_before_action :some_callback, if: -> { condition }, except: action
```
```ruby
skip_before_action :some_callback, if: -> { condition }
```
Diffstat (limited to 'actionpack/lib/action_controller/metal/flash.rb')
0 files changed, 0 insertions, 0 deletions