Skip to content

Commit

Permalink
Update readme to reflect grouped calculations change.
Browse files Browse the repository at this point in the history
  • Loading branch information
leoasis committed May 3, 2013
1 parent 2582515 commit 685a51c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ executed whenever `#to_a` gets executed. Note that, as ActiveRecord does, enumer
so things like `#each`, `#map`, `#collect` all trigger the future.

Also, ActiveRecord::Relation instances get all the calculation methods provided by the ActiveRecord::Calculations module
"futurized", that means, for `#count` you get `#future_count`, for `#sum` you get `#future_sum` and so on. If the calculation
returns a list of values, for example with a `#future_pluck` or a grouped `#future_count`, the future will be triggered with
the `#to_a` method (or any of the methods that delegate to `#to_a`). If it returns a single value, the future will be
triggered when you execute the `#value` method.
"futurized", that means, for `#count` you get `#future_count`, for `#sum` you get `#future_sum` and so on. All future
calculations are triggered with the `#value` method, except for the `#future_pluck` method, that returns an array, and is
triggered with a `#to_a` method (or any other method that delegates to it).

## Database support

Expand Down

0 comments on commit 685a51c

Please sign in to comment.