diff options
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/3_2_release_notes.md | 2 | ||||
-rw-r--r-- | guides/source/active_record_querying.md | 17 | ||||
-rw-r--r-- | guides/source/asset_pipeline.md | 4 | ||||
-rw-r--r-- | guides/source/documents.yaml | 5 |
4 files changed, 20 insertions, 8 deletions
diff --git a/guides/source/3_2_release_notes.md b/guides/source/3_2_release_notes.md index cdcde67869..2416e1a228 100644 --- a/guides/source/3_2_release_notes.md +++ b/guides/source/3_2_release_notes.md @@ -562,4 +562,4 @@ Credits See the [full list of contributors to Rails](http://contributors.rubyonrails.org/) for the many people who spent many hours making Rails, the stable and robust framework it is. Kudos to all of them. -Rails 3.2 Release Notes were compiled by [Vijay Dev](https://github.com/vijaydev.) +Rails 3.2 Release Notes were compiled by [Vijay Dev](https://github.com/vijaydev). diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index ee8cf4ade6..673dcfc1d3 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -659,6 +659,23 @@ FROM orders GROUP BY date(created_at) ``` +### Total of grouped items + +To get the total of grouped items on a single query call `count` after the `group`. + +```ruby +Order.group(:status).count +# => { 'awaiting_approval' => 7, 'paid' => 12 } +``` + +The SQL that would be executed would be something like this: + +```sql +SELECT COUNT (*) AS count_all, status AS status +FROM "orders" +GROUP BY status +``` + Having ------ diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index 984480c70f..559d3f5e7d 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -580,7 +580,7 @@ config.assets.raise_runtime_errors = false When this option is true, the asset pipeline will check if all the assets loaded in your application are included in the `config.assets.precompile` list. -If `config.assets.digests` is also true, the asset pipeline will require that +If `config.assets.digest` is also true, the asset pipeline will require that all requests for assets include digests. ### Turning Digests Off @@ -589,7 +589,7 @@ You can turn off digests by updating `config/environments/development.rb` to include: ```ruby -config.assets.digests = false +config.assets.digest = false ``` When this option is true, digests will be generated for asset URLs. diff --git a/guides/source/documents.yaml b/guides/source/documents.yaml index e365435b50..5138412312 100644 --- a/guides/source/documents.yaml +++ b/guides/source/documents.yaml @@ -96,11 +96,6 @@ url: command_line.html description: This guide covers the command line tools and rake tasks provided by Rails. - - name: Caching with Rails - work_in_progress: true - url: caching_with_rails.html - description: Various caching techniques provided by Rails. - - name: Asset Pipeline url: asset_pipeline.html description: This guide documents the asset pipeline. |