On Fri, Mar 12, 2010 at 2:59 AM, Andy Jeffries <[email protected]>wrote:
> > It's dirty, horrible, bad form, breaks the separation of layers... >>>> >>>> I don't know what you mean by dirty, it saves several lines of code >>>> and when looking at the view code it is easier to see what is >>>> happening than to see a variable that has to be hunted for in a filter >>>> somewhere to find out what it is. >>>> >>> >>> It saves 4 lines of code, but breaks one of the principles of MVC layered >>> separation. I'd say the 4 lines is worth it for keeping the application >>> clean. >>> >> >> But think how many lines of code you are going to have to go edit when you >> realize that you need to change it. >> > > Did you misunderstand my post? I was arguing for putting it in a filter > rather than in the view (hence saying the 4 lines of before_filter, private, > def and end was worth it). > > It sounds like - when you start with "But" - that you disagree, but the > rest of your post seems to be arguing from the same side as my posts. > > Cheers, > > Yeah, I thought you were saying that not using a filter saves 4 lines of code, and is therefore cleaner, and thus worth it. Seemed to be a weird position to take, glad it was just a misunderstanding. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

