aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_querying.textile
diff options
context:
space:
mode:
authorJames Miller <james@jkmillertech.com>2009-02-06 07:51:11 -0800
committerJames Miller <james@jkmillertech.com>2009-02-06 07:51:11 -0800
commita44f613c5f32ec5da174198dd841f122efe64f95 (patch)
treef004044d6fcdebfdbce8ff63d38966d969b59e5d /railties/guides/source/active_record_querying.textile
parentab8f87729ebb4cf24a5fee525dd73b5e776eb505 (diff)
downloadrails-a44f613c5f32ec5da174198dd841f122efe64f95.tar.gz
rails-a44f613c5f32ec5da174198dd841f122efe64f95.tar.bz2
rails-a44f613c5f32ec5da174198dd841f122efe64f95.zip
Fix some spelling erros in Active Record Querying guide
Diffstat (limited to 'railties/guides/source/active_record_querying.textile')
-rw-r--r--railties/guides/source/active_record_querying.textile6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile
index ffffecace3..99cf2affd8 100644
--- a/railties/guides/source/active_record_querying.textile
+++ b/railties/guides/source/active_record_querying.textile
@@ -294,7 +294,7 @@ Be careful because this also means you're initializing a model object with only
ActiveRecord::MissingAttributeError: missing attribute: <attribute>
</shell>
-Where <attribute> is the atrribute 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.
+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.
You can also call SQL functions within the select option. For example, if you would like to only grab a single record per unique value in a certain field by using the +DISTINCT+ function you can do it like this: +Client.all(:select => "DISTINCT(name)")+.
@@ -413,7 +413,7 @@ If you wanted to find the address and mailing address for that client you would
mailing_addresses.client_id = client.id
</sql>
-This query is more efficent, but there's a gotcha: if you have a client who does not have an address or a mailing address they will not be returned in this query at all. If you have any association as an optional association, you may want to use include rather than joins. Alternatively, you can use a SQL join clause to specify exactly the join you need (Rails always assumes an inner join):
+This query is more efficient, but there's a gotcha: if you have a client who does not have an address or a mailing address they will not be returned in this query at all. If you have any association as an optional association, you may want to use include rather than joins. Alternatively, you can use a SQL join clause to specify exactly the join you need (Rails always assumes an inner join):
<ruby>
Client.all(:joins => “LEFT OUTER JOIN addresses ON
@@ -555,7 +555,7 @@ This method, called as +Client.active_within_2_weeks.all+, will return all clien
h4. Arguments to Named Scopes
-If you want to pass to a named scope a required arugment, just specify it as a block argument like this:
+If you want to pass to a named scope a required argument, just specify it as a block argument like this:
<ruby>
class Client < ActiveRecord::Base