Sha256: 7076f3f258841e49a987c00d7d552bff612d5aa7b3ab0794b3ccf9901af093a8
Contents?: true
Size: 554 Bytes
Versions: 7
Compression:
Stored size: 554 Bytes
Contents
# frozen_string_literal: true require 'rails_compatibility' require 'rails_compatibility/active_record' class << RailsCompatibility if ActiveRecord::Base.respond_to?(:attribute_types) # column_types was changed to attribute_types in Rails 5 def attribute_types(klass) klass.attribute_types end elsif ActiveRecord::Base.respond_to?(:column_types) # Rails 4 def attribute_types(klass) klass.column_types end else # In Rails 3 def attribute_types(klass) klass.columns_hash end end end
Version data entries
7 entries across 7 versions & 1 rubygems