module Foreigner::Helper

Public Class Methods

active_record_version() click to toggle source
# File lib/foreigner/helper.rb, line 3
def self.active_record_version
  if ::ActiveRecord.respond_to? :version
    ActiveRecord.version
  elsif ::ActiveRecord::VERSION::STRING
    Gem::Version.new(::ActiveRecord::VERSION::STRING)
  else
    raise "Unknown ActiveRecord Version API"
  end
end