[LRUG] Are before_filters abused in Rails?

Steve Tooke steve.tooke at gmail.com
Thu Mar 22 10:45:16 PDT 2012


On Thu, Mar 22, 2012 at 12:50 PM, Jay Caines-Gooby <jay at gooby.org> wrote:

> I also like the helper_method style
> https://gist.github.com/2007669#file_helper_method_controller.rb


I've been using this style quite a bit lately.

I like the fact it gives you some kind of explicit interface for your
views, rather than just relying on instance variable copying.

It also has some benefits with partials - as you can override the helper
method by passing a local. Which you can't if the partial is relying on an
instance variable.

Steve
-- 
/tooky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120322/5317ab3f/attachment.html>


More information about the Chat mailing list