Skip to content

Commit

Permalink
Rely on ActiveRecord.version. Is in support AR versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Jul 23, 2019
1 parent fe511ed commit 1dea14b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ranked-model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def handle_ranking_failure(ranker, ranking_failed_reason)
abort_handle_ranking
end

if defined?(Rails) && Rails.version >= '5'
if defined?(ActiveRecord) && ::ActiveRecord.version.to_s >= '5'
def abort_handle_ranking
throw :abort
end
Expand Down

0 comments on commit 1dea14b

Please sign in to comment.