how can i execute a sql sentence

If you're doing updates, it's better to just do

ActiveRecord::Base.connection.execute "MY SQL HERE"

you can use a model class instead of AR::Base if you want there, it
doesn't matter. Well actually it does, if your model class is using a
different connection then the default. But it doesn't matter the vast
majority of the time :slight_smile: