Relax Rails dependency to allow 5.1

This commit is contained in:
Grzesiek Kolodziejczyk
2017-05-18 11:39:18 +02:00
parent 25d8adaf8b
commit 8aeb9a6c70
8 changed files with 127 additions and 100 deletions

View File

@@ -1,4 +1,10 @@
class CreateBlogs < ActiveRecord::Migration
migration_class = if Gem::Version.new(Rails.version) >= Gem::Version.new("5.0")
ActiveRecord::Migration[4.2]
else
ActiveRecord::Migration
end
class CreateBlogs < migration_class
def change
create_table :blogs do |t|
t.string :title