Created
May 14, 2010 12:45
-
-
Save mallain/401101 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
mickael@mickael-laptop:~/projects/pabd$ script/console | |
Loading development environment (Rails 2.3.5) | |
>> Assignment.last | |
=> #<Assignment id: 5, agency_id: 1, account_id: 2, created_at: "2010-05-14 12:17:12", updated_at: "2010-05-14 12:17:12", account_type_id: 2> | |
>> AccountType.find(2) | |
=> #<AccountType id: 2, name: "Petit Compte", created_at: "2010-05-14 12:10:33", updated_at: "2010-05-14 12:10:33", deleted_at: nil> | |
>> AccountType.find(2).destroy | |
=> #<AccountType id: 2, name: "Petit Compte", created_at: "2010-05-14 12:10:33", updated_at: "2010-05-14 12:10:33", deleted_at: "2010-05-14 12:43:20"> | |
>> AccountType.find(2) | |
ActiveRecord::RecordNotFound: Couldn't find AccountType with ID=2 | |
from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1586:in `find_one' | |
from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1569:in `find_from_ids' | |
from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:616:in `find_without_find_wrapper' | |
from /home/mickael/projects/pabd/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `send' | |
from /home/mickael/projects/pabd/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `find' | |
from (irb):4 | |
>> AccountType.find_with_deleted(2) | |
=> #<AccountType id: 2, name: "Petit Compte", created_at: "2010-05-14 12:10:33", updated_at: "2010-05-14 12:10:33", deleted_at: "2010-05-14 12:43:20"> | |
>> Assignment.last | |
=> #<Assignment id: 5, agency_id: 1, account_id: 2, created_at: "2010-05-14 12:17:12", updated_at: "2010-05-14 12:17:12", account_type_id: 2> | |
>> Assignment.last.account_type | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Micka, d'où vient #find_with_deleted ? Cela me semble un plugin, non?