[PATCH] Add conditions to filters
Reported by Steve Tooke (tooky) | February 15th, 2008 @ 01:39 PM
Based on the ideas presented here I've added :if and :unless conditions to filters. This will allow you to do things like:
class Foo < Application
before :authorize, :unless => :logged_in?
end
This means you don't have to write conditional logic in your filter methods.
to have a look, please pull:
git pull git://gitorious.org/merb-core/mainline.git conditional_filters
Comments and changes to this ticket
-
Michael D. Ivey (ivey) February 17th, 2008 @ 05:58 PM
- → State changed from new to resolved
- → Assigned user changed from to Michael D. Ivey (ivey)
Well done. Good specs, and a nice refactor of _call_filter_for_action and _filter_condition_met.
Merged.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
