diff options
author | Andreas Scherer <andreas_coder@freenet.de> | 2009-02-18 11:38:57 +0100 |
---|---|---|
committer | Andreas Scherer <andreas_coder@freenet.de> | 2009-02-18 11:38:57 +0100 |
commit | bec07bc5d2229e8b1f9aa1f2750d71472c129f40 (patch) | |
tree | 63a7c882ccf0aa0a7ffc461eb5d469746969f4ee /railties/guides/source | |
parent | 4d4e78fe8bb421f21eb56b4858dd19f290fabfce (diff) | |
download | rails-bec07bc5d2229e8b1f9aa1f2750d71472c129f40.tar.gz rails-bec07bc5d2229e8b1f9aa1f2750d71472c129f40.tar.bz2 rails-bec07bc5d2229e8b1f9aa1f2750d71472c129f40.zip |
Verbatim markup does not escape angle brackets.
If 'attribute' is to be marked as a variable part of a function name, use some
other form of visualization.
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/2_2_release_notes.textile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/2_2_release_notes.textile b/railties/guides/source/2_2_release_notes.textile index 6f882f6d7d..f60af01050 100644 --- a/railties/guides/source/2_2_release_notes.textile +++ b/railties/guides/source/2_2_release_notes.textile @@ -164,9 +164,9 @@ h4. New Dynamic Finders Two new sets of methods have been added to Active Record's dynamic finders family. -h5. +find_last_by_<attribute>+ +h5. +find_last_by_<em>attribute</em>+ -The +find_last_by_<attribute>+ method is equivalent to +Model.last(:conditions => {:attribute => value})+ +The +find_last_by_<em>attribute</em>+ method is equivalent to +Model.last(:conditions => {:attribute => value})+ <ruby> # Get the last user who signed up from London @@ -175,9 +175,9 @@ User.find_last_by_city('London') * Lead Contributor: "Emilio Tagua":http://www.workingwithrails.com/person/9147-emilio-tagua -h5. +find_by_<attribute>!+ +h5. +find_by_<em>attribute</em>!+ -The new bang! version of +find_by_<attribute>!+ is equivalent to +Model.first(:conditions => {:attribute => value}) || raise ActiveRecord::RecordNotFound+ Instead of returning +nil+ if it can't find a matching record, this method will raise an exception if it cannot find a match. +The new bang! version of +find_by_<em>attribute</em>!+ is equivalent to +Model.first(:conditions => {:attribute => value}) || raise ActiveRecord::RecordNotFound+ Instead of returning +nil+ if it can't find a matching record, this method will raise an exception if it cannot find a match. <ruby> # Raise ActiveRecord::RecordNotFound exception if 'Moby' hasn't signed up yet! |