Created
January 24, 2011 14:20
-
-
Save ngw/793278 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ngw@slicingupeyeballs:~/foora]$ rails c (01-24 15:17) | |
Loading development environment (Rails 3.0.3) | |
ruby-1.8.7-p330 :001 > u = User.last | |
=> #<User _id: 4d385c454fcb065289000006, name: "Nicholas Wieland", following_ids: nil, last_sign_in_ip: "127.0.0.1", last_sign_in_at: Sun Jan 23 09:58:33 UTC 2011, sign_in_count: 7, current_sign_in_ip: "127.0.0.1", remember_token: "SQwUb1kLBLJQ0kj41UmF", authentication_token: nil, current_sign_in_at: Mon Jan 24 13:01:12 UTC 2011, remember_created_at: Thu Jan 20 16:03:29 UTC 2011, invitation_sent_at: Thu Jan 20 16:01:10 UTC 2011, email: "nicholas.wieland@gmail.com", invitation_token: "Yj8FgssfXC20PfEpn0LJ"> | |
ruby-1.8.7-p330 :002 > u.update_attributes :email => 'ngw@nofeed.org' | |
Mongoid::Errors::InvalidCollection: Access to the collection for Answer is not allowed since it is an embedded document, please access a collection from the root document. | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/collections.rb:21:in `collection' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/contexts/mongo.rb:126:in `execute' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/contexts/mongo.rb:185:in `iterate' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/criteria.rb:109:in `each' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/criteria.rb:109:in `tap' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/criteria.rb:109:in `each' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/relations/referenced/many.rb:187:in `entries' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/relations/referenced/many.rb:187:in `load!' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/relations/referenced/many.rb:185:in `tap' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/relations/referenced/many.rb:185:in `load!' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/relations/referenced/many.rb:308:in `method_missing' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validator.rb:153:in `validate' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `each' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `validate' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:314:in `send' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:314:in `_callback_before_75' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:465:in `_run_validate_callbacks' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validations.rb:212:in `run_validations!' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `run_validations!' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:413:in `_run_validation_callbacks' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `run_validations!' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validations.rb:179:in `valid?' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/validations.rb:49:in `valid?' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/gems/activemodel-3.0.3/lib/active_model/validations.rb:187:in `invalid?' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/persistence/update.rb:44:in `persist' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/persistence.rb:87:in `update' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/persistence.rb:148:in `save' | |
from /Users/ngw/.rvm/gems/ruby-1.8.7-p330/bundler/gems/mongoid-8af3b6ace655/lib/mongoid/persistence.rb:115:in `update_attributes' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment