diff options
author | Eric Anderson <eric@pixelwareinc.com> | 2011-04-20 10:43:35 -0400 |
---|---|---|
committer | Eric Anderson <eric@pixelwareinc.com> | 2011-04-20 10:43:35 -0400 |
commit | a48f8089aba974465ccd1f99506f04d1f60ac2d2 (patch) | |
tree | 67ca990024b44486e81f37f943713904f61620f0 | |
parent | aa19a7d0859052bf197e8898995ad4c280f64330 (diff) | |
download | rails-a48f8089aba974465ccd1f99506f04d1f60ac2d2.tar.gz rails-a48f8089aba974465ccd1f99506f04d1f60ac2d2.tar.bz2 rails-a48f8089aba974465ccd1f99506f04d1f60ac2d2.zip |
Exception got moved to ActiveModel with Rails 3
-rw-r--r-- | railties/guides/source/active_record_querying.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 7cdffe4c2e..2f0a51e868 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -418,7 +418,7 @@ SELECT viewable_by, locked FROM clients Be careful because this also means you're initializing a model object with only the fields that you've selected. If you attempt to access a field that is not in the initialized record you'll receive: <shell> -ActiveRecord::MissingAttributeError: missing attribute: <attribute> +ActiveModel::MissingAttributeError: missing attribute: <attribute> </shell> Where +<attribute>+ is the attribute you asked for. The +id+ method will not raise the +ActiveRecord::MissingAttributeError+, so just be careful when working with associations because they need the +id+ method to function properly. |