diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-14 06:49:08 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-14 06:49:08 -0800 |
commit | 38d0a222e275d917a2c1d093b24457bafb600a00 (patch) | |
tree | 506b6efab81a724c6795f9fb24d1f8e9e99f368d /README.markdown | |
parent | 6bcd287628a38d74a128c9735431338fb10d2cba (diff) | |
parent | 22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d (diff) | |
download | rails-38d0a222e275d917a2c1d093b24457bafb600a00.tar.gz rails-38d0a222e275d917a2c1d093b24457bafb600a00.tar.bz2 rails-38d0a222e275d917a2c1d093b24457bafb600a00.zip |
Merge pull request #152 from parkerl/master
Update README to have a better GROUP BY example Issue #86
Closes #86
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index afef04212a..70b378ff33 100644 --- a/README.markdown +++ b/README.markdown @@ -54,7 +54,7 @@ What are called `LIMIT` and `OFFSET` in SQL are called `take` and `skip` in Arel `GROUP BY` is called `group`: - users.group(users[:name]) # => SELECT * FROM users GROUP BY name + users.project(users[:name]).group(users[:name]) # => SELECT users.name FROM users GROUP BY users.name The best property of the Relational Algebra is its "composability", or closure under all operations. For example, to restrict AND project, just "chain" the method invocations: |