Well, the full stacktrace is:
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1557:in
`attribute_names''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:2060:in
`clone_attributes''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1519:in
`attributes''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1945:in
`attributes_with_quotes''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1725:in
`update_without_lock''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/locking.rb:33:in
`update_without_callbacks''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/callbacks.rb:274:in
`update_without_timestamps''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/timestamp.rb:39:in
`update''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1718:in
`create_or_update_without_callbacks''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/callbacks.rb:249:in
`create_or_update''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1392:in
`save_without_validation''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/validations.rb:724:in
`save_without_transactions''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/transactions.rb:126:in
`save''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in
`transaction''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/transactions.rb:91:in
`transaction''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/transactions.rb:118:in
`transaction''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/transactions.rb:126:in
`save''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1398:in
`save_without_validation!''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/validations.rb:734:in
`save!''
#{RAILS_ROOT}/app/models/player.rb:15:in `create_player''
#{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player''
And seeing the source code for base.rb, I notice it failed at:
# Returns an array of names for the attributes available on this object
sorted alphabetically.
def attribute_names
@attributes.keys.sort <---------- HERE IS THE ERROR
end
What I''m doing wrong?
--
Posted via http://www.ruby-forum.com/.