lib/friendly_id/migration.rb in friendly_id-5.2.3 vs lib/friendly_id/migration.rb in friendly_id-5.2.4

- old
+ new

@@ -1,5 +1,12 @@ -class CreateFriendlyIdSlugs < ActiveRecord::Migration +migration_class = + if ActiveRecord::VERSION::MAJOR >= 5 + ActiveRecord::Migration[4.2] + else + ActiveRecord::Migration + end + +class CreateFriendlyIdSlugs < migration_class def change create_table :friendly_id_slugs do |t| t.string :slug, :null => false t.integer :sluggable_id, :null => false t.string :sluggable_type, :limit => 50