I have the following script
ActiveRecord::Base.establish_connection(:adapter => 'mysql', :database => 'development', :username => 'appAccount', :password => '------', :socket => '/tmp/mysql.sock')
class ProcessQueue < ActiveRecord::Base
end
The tutorial I'm using claims the following should work.
updateQ = ProcessQueue.find(:all, :conditions => "photoID = '234'")
updateQ.ExIfQ = 1
updateQ.save
updateQ has the following data
ProcessQueue id: 104, photoID: 234, ExIfQ: 0, Providor: 0, created_at: "2009-12-30 14:42:01", updated_at: "2009-12-30 14:42:01"
But when running updateQ.ExIfQ = 1 I get an error saying the method does not exist
NoMethodError: undefined method 'ExIfQ=' for #<Array:0x102207c60>
The error makes sense. I'm trying to make a change on an array. Therefore I can only assume either I'm wrong or the tutorial is wrong :)
I was wondering if someone could tell me how I should be making this update?
p.s this is a background script running in my rails application.
Thanks