lib/combustion/database/migrate.rb in combustion-1.3.5 vs lib/combustion/database/migrate.rb in combustion-1.3.6
- old
+ new
@@ -4,12 +4,14 @@
def self.call
new.call
end
def call
- if ActiveRecord::VERSION::STRING.to_f >= 5.2
+ ar_gate = Combustion::VersionGate.new("activerecord")
+
+ if ar_gate.call(">= 5.2")
migration_context.migrate
- elsif ActiveRecord::VERSION::STRING.to_f >= 3.1
+ elsif ar_gate.call(">= 3.1")
migrator.migrate paths, nil
else
paths.each { |path| migrator.migrate path, nil }
end
end