On 7 Apr 2008, at 16:19, Frantisek Psotka wrote:
>
> Hello.
>
> How can I run custom slq query? I want to delete all rows from table,
> which is not mapped to activerecord model. Thanks.
>
ActiveRecord::Base.connection.execute ''...''
(there''s also ActiveRecord::Base.connection.delete,
ActiveRecord::Base.connection.insert,
ActiveRecord::Base.connection.update etc... which you should use if
possible as these will invalidate the query cache)
Fred
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---