Skip to content

Commit

Permalink
Fix conditional that checks if ActiveRecord is < 5.0.2:
Browse files Browse the repository at this point in the history
- The conditional wasn't correct, any version with a `0` minor and
  `< 2` patch (which is true for 6.0.0) would return that the version
  was `< 5.0.2`.
  • Loading branch information
Edouard-chin committed Dec 3, 2018
1 parent 0fa79db commit e015dfb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def deserialize(array)
private

def active_record_pre_502?
::ActiveRecord::VERSION::MAJOR < 5 ||
(::ActiveRecord::VERSION::MINOR.zero? && ::ActiveRecord::VERSION::TINY < 2)
::ActiveRecord.version < Gem::Version.new('5.0.2')
end

def serialize_with_ar(array)
Expand Down

0 comments on commit e015dfb

Please sign in to comment.