Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of http://github.com/radar/by_star

  • Loading branch information...
commit c377304bddb18881d43f0587217e3ee92410b9f6 2 parents d06a2b4 + dd65a41
@johnnyshields johnnyshields authored
Showing with 9 additions and 4 deletions.
  1. +5 −3 UPGRADING
  2. +4 −1 lib/by_star/orm/active_record/by_star.rb
View
8 UPGRADING
@@ -1,9 +1,11 @@
Upgrading to ByStar 2.2.0
-------------------------
-* For Mongoid only, ByStar's `.between` method has been removed and replaced with `.between_times`
-(previously `.between_times` was an alias to `.between`). Mongoid already provides a native `.between`
-finder method that we do not want to mask. ActiveRecord users may continue to use either method.
+* ActiveRecord: the `between` method has been deprecated as of version 2.2.0, and will be removed in version 3.3.0.
+Please use `between_times` instead.
+
+* Mongoid: the `between` method has been removed as of version 2.2.0, as it conflicts with the native Mongoid `between`
+method. Please use `between_times` instead.
* Chronic gem (used for time string parsing) has been removed as a hard dependency for ByStar,
however it is still supported. If you would like to use Chronic with ByStar, please explicitly
View
5 lib/by_star/orm/active_record/by_star.rb
@@ -18,7 +18,10 @@ def between_times_query(start, finish, options={})
scope
end
- alias_method :between, :between_times
+ def between(*args)
+ ActiveSupport::Deprecation.warn 'ByStar `between` method will be removed in v3.0.0. Please use `between_times`'
+ between_times(*args)
+ end
protected
Please sign in to comment.
Something went wrong with that request. Please try again.