Sha256: d10a2ff1037d310764ecfdd64e9d91b53addd2fcebc31aaa5d6a7ba4759e0a4e

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

1.0.3 / 2012-06-06

* Bug fixes

  * Properly handle range conditions

1.0.2 / 2012-06-06

* Enhancements

  * Arel::SelectManager#cohort_possible? - in case you want to know without having to re-count.
  * Simplify aliasing examples in tests.

1.0.1 / 2012-06-05

* Bug fixes

  * Properly test on mysql and postgres - you'll need a table/subquery alias like "AS t1"

1.0.0 / 2012-06-05

* Breaking changes

  * Cohorts with initially (originally) empty characteristics return everything. Before they returned nothing.
  * Removed #cohort_constraint. There was really no correct way to use it. Now it's recommended you union together cohorts.
  * ActiveRecord::{Base.,Relation#}cohort returns an Arel::SelectManager, NOT another ActiveRecord::Relation. That means you can't call, for example, #count on it - you have to treat it like an ARel object.

* Enhancements

  * You can use #cohort when composing with ARel. Just be safe about how you use it - it's not an automagic ActiveRecord::Relation.
  * True unit tests, including explicit tests for UNIONing together cohorts.
  * Tested on MRI 1.8, MRI 1.9, and JRuby 1.6.7

0.4.0 / 2012-02-28

* renamed to cohort_analysis
* new, simplified syntax - see README.markdown

0.3.0 / 2012-02-27

* Now my_strategy = Person.strategy({:favorite_color => 'heliotrope', :birthdate => @date_range}, :importance => [:birthdate, :favorite_color]) will return a Arel::Nodes::Node which can be combined like Person.where(my_strategy.and("gender = 'male")) - it does NOT return a "scope" like before.
* Refactor to take advantage of ARel.

0.2.0

* No longer "flattens" or "sanitizes" characteristics by turning records into integer IDs, etc. You should pass in exactly what you would pass into a normal ActiveRecord relation/scope.

0.1.0

* First version!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cohort_analysis-1.0.3 CHANGELOG