[Rails] Help with ActiveRecord

PJ Hyett
2006-05-05T17:41:49Z

Model:

class AdminQueue < ActiveRecord::Base
 set_table_name ''adminqueue''
end

Interacting with it in script/console

>> AdminQueue.new
=> #<AdminQueue:0x240a910 @attributes={"topic_id"=>nil,
"resolved"=>nil, "updated_on"=>nil,
"action"=>nil, "type"=>nil,
"post_id"=>nil, "mod_name"=>nil,
"count"=>1, "user_id"=>nil,
"comment"=>nil}, @new_record=true>

>> AdminQueue.find(:all)
SyntaxError: (eval):1:in `compute_type'': compile error
(eval):1: parse error, unexpected tINTEGER
Object::0
        ^
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1244:in
`compute_type''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:983:in
`instantiate_without_callbacks''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/callbacks.rb:215:in
`instantiate''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:390:in
`find_by_sql''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:390:in
`find_by_sql''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:924:in
`find_every''
       from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:381:in
`find''
       from (irb):7

Any ideas?

Thanks,
PJ