Forum: Ruby on Rails Using mysql's 'REPLACE' command in active record

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Richard M. (Guest)
on 2009-03-18 04:25
(Received via mailing list)
Is this possible ??

Many thnaks

Mark Reginald J. (Guest)
on 2009-03-19 06:30
(Received via mailing list)
Richard wrote:
> Is this possible ??

Yes, but only with custom SQL:

Model.connection.insert "replace into #{Model.table_name} ...."

Rails Wheels - Find Plugins, List & Sell Plugins -
Richard M. (Guest)
on 2009-03-19 06:34
(Received via mailing list)
Thanks for the reply Mark,

This is as I thought... :(

At least it is sort of do-able, I don't enjoy putting sql in
activerecord but sometimes I guess it is needed...


This topic is locked and can not be replied to.