Using mysql's 'REPLACE' command in active record

Is this possible ??

Many thnaks


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 -

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…



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