I've just noticed that before_filter can absorb a block in order to
pass parameters to pre-executed actions. Here's an example:
[code]before_filter{|c| c.authorized(1)} [/code]
However, in such case, action authorized must be public, while in the tradtional way,
[code]before_filter :authorized[/code]
the action can be in any visibility. I wonder why...
pass parameters to pre-executed actions. Here's an example:
[code]before_filter{|c| c.authorized(1)} [/code]
However, in such case, action authorized must be public, while in the tradtional way,
[code]before_filter :authorized[/code]
the action can be in any visibility. I wonder why...