Side-effect before_filters in Rails
Piers is talking about the dangers of side-effect filters in Rails. That is, the unexpected behavior that can occur when a before filter that’s not conditional returns false.
The solution I’ve been using:
def i_am_a_before_filter returning(true) do # ... side-effect code end end
About this entry
You’re currently reading “Side-effect before_filters in Rails,” an entry on geeksomnia
- Published:
- 10.09.07 / 12am
- Category:
- Code
No comments
Jump to comment form | comments rss [?] | trackback uri [?]