On 24 May 2011 22:00, David Kahn <d...@structuralartistry.com> wrote: > > > On Tue, May 24, 2011 at 3:58 PM, Kevin <darkint...@gmail.com> wrote: >> >> I'm porting a bunch of sql queries used to generate reports of various >> kinds. I have a report controller that has no model and will contain all >> the actions that display report results. Where should I stick my wrapper >> methods for these queries. I don't like having them stuck right in the >> middle of my controller action code. Would the helper module for the report >> controller be a good place? > > Why not place them in the most appropriate model? Helpers really should be > in terms of helping you format your views per se, not business logic. You > definitely dont want it in the controller if it is at all involved (and it > should be if you are resorting to raw sql.
If there is no appropriate model then add one or more (not derived from ActiveRecord) to hold the code. Colin -- 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 rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.