Forum: Ruby on Rails update_all broken in postgres?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Iphan I. (Guest)
on 2006-06-01 13:04

has anyone managed to use update_all with rails on postgres?

In my setup, it does not work:

>> @keyword.update_all(myupdates)
NoMethodError: undefined method `update_all' for #<Keyword:0xb7ac4670>
        from (irb):14

I checked that the base.rb class contains the update_all method, so it
seems like

        connection.update(sql, "#{name} Update")

isn't working
Iphan I. (Guest)
on 2006-06-01 13:07
sorry just realised this is a class method, not an instance method!
Ioana K. (Guest)
on 2006-06-01 13:11
(Received via mailing list)
update_all is for ActiveRecord...use class_name.update_all
This topic is locked and can not be replied to.