ActiveRecord instead of direct sql execution

Hi all,

I have 2 tables and a standard one-to-many association.

How do I substitute the following sql with ActiveRecord calls so that
it uses just one sql statement:

 update geo_entities set terminal_id = 3  where id = 10 or id = 23

or id = 87;

Thank you!

Yuri L.

GeoEntities.update_all(“terminal_id = 3”, “id = 10 or id = 23 or id =



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