Skip to content

Commit

Permalink
fixed query output
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Jan 8, 2011
1 parent bc6e1a1 commit 4d29816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/guides/source/active_record_querying.textile
Expand Up @@ -440,7 +440,7 @@ And this will give you a single +Order+ object for each date where there are ord
The SQL that would be executed would be something like this:

<sql>
SELECT * FROM orders GROUP BY date(created_at)
SELECT * FROM orders GROUP BY date(created_at) ORDER BY created_at
</sql>

h3. Having
Expand Down Expand Up @@ -664,7 +664,7 @@ Eager loading is the mechanism for loading the associated records of the objects
Consider the following code, which finds 10 clients and prints their postcodes:

<ruby>
clients = Client.all(:limit => 10)
clients = Client.limit(10)

clients.each do |client|
puts client.address.postcode
Expand Down

0 comments on commit 4d29816

Please sign in to comment.