I have an application that generates an ever growing list of stock
reports. I find myself some method in a controller creating a
connection to the database (postgres in this case), executing a custom
sql, using the data returned to create one or more graphs with gruff,
and sending them off to be displayed.

This puts the creation of a connection to the database, and the actual
sql in the controller. I am not sure that this is such a good idea. I
am looking for suggestions on a better approach.

Should I create a separate class with a method to match each arbitrary
sql returning the data from a method call?

Should the queries be converted to stored functions which then get
called from the controller, or a separate class?

Insights would be appreciated.

Cheers--

Charles

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to