According to what I’m reading in the docs, the before_filter method is deprecated.
This question is two-fold: First, is that correct (It doesn’t work in Rails 3, so I’m pretty sure it is) and second, what is another way to replicate that method just with using Rails/Ruby’s built-in methods?
From what I can find, there isn’t anything like it, but I could be looking in the wrong place.
Rails 4.2’s changelogs mention that all
*_filtermethods are going away in favor of their*_actioncounterparts.Versions up to Rails 4.2 can use
before_filteras they please. Versions 4.2 and above should usebefore_action(and friends) instead.