Using mysql's 'REPLACE' command in active record


#1

Is this possible ??

Many thnaks

Richard


#2

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 -
http://railswheels.com


#3

Thanks for the reply Mark,

This is as I thought… :frowning:

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

Cheers

Richard