Using mysql's 'REPLACE' command in active record

Is this possible ??

Many thnaks

Richard

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs