Re: [Rails] raw sql query-update
On 9 August 2011 18:34, Angelo Cordova <acordinz@gmail.com> wrote:
> Hi people
>
> I need to write a raw sql query in rails 3. But I don't know where
> should I do this, in the model or in the controller?
If you are not sure where it should be then firstly I would ask
whether you are sure you need to write a raw sql query. If you do
need to do that then almost always it should be in a model. However
without knowing more details of what it does and why, it is impossible
to give an absolute answer.
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home