Module: SolidusSupport::Migration
- Defined in:
- lib/solidus_support/migration.rb
Class Method Summary collapse
Class Method Details
.[](version) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/solidus_support/migration.rb', line 5 def self.[](version) if Rails.gem_version >= Gem::Version.new('5.x') ActiveRecord::Migration[version] else # Rails < 5 doesn't support specifying rails version of migrations, but # it _is_ rails 4.2, so we can use that when requested. return ActiveRecord::Migration if version.to_s == '4.2' raise ArgumentError, "Unknown migration version '#{version}'; expected one of '4.2'" end end |