From ec0491110f7a34f6c9a4c2d82e50c1161e9b65b0 Mon Sep 17 00:00:00 2001 From: Jordan Hudgens Date: Sat, 24 Jun 2017 13:38:42 -0700 Subject: [PATCH] Implemented patch that will add the Rails major version to the migration file --- .../active_record/templates/create_impressions_table.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/active_record/templates/create_impressions_table.rb b/lib/generators/active_record/templates/create_impressions_table.rb index 13454b2..e0f2428 100644 --- a/lib/generators/active_record/templates/create_impressions_table.rb +++ b/lib/generators/active_record/templates/create_impressions_table.rb @@ -1,4 +1,4 @@ -class CreateImpressionsTable < ActiveRecord::Migration +class CreateImpressionsTable < ActiveRecord::Migration<%= Rails::VERSION::MAJOR >= 5 ? "[#{Rails.version.to_f}]" : "" %> def self.up create_table :impressions, :force => true do |t| t.string :impressionable_type