Skip to content

Commit

Permalink
Merge pull request lynndylanhurley#700 from juddey/fix-698
Browse files Browse the repository at this point in the history
Fix Migration Deprecation Warning
  • Loading branch information
booleanbetrayal authored Aug 16, 2016
2 parents e984377 + e9385d4 commit 3833543
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DeviseTokenAuthCreate<%= user_class.pluralize %> < ActiveRecord::Migration
class DeviseTokenAuthCreate<%= user_class.pluralize %> < ActiveRecord::Migration<%= '[' << Rails::VERSION::STRING[0..2] << ']'%>
def change
create_table(:<%= user_class.pluralize.underscore %>) do |t|
## Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class InstallGeneratorTest < Rails::Generators::TestCase
assert_migration 'db/migrate/devise_token_auth_create_users.rb'
end

test 'migration file contains rails version' do
assert_migration 'db/migrate/devise_token_auth_create_users.rb', /4.2/
end

test 'subsequent runs raise no errors' do
run_generator
end
Expand Down

0 comments on commit 3833543

Please sign in to comment.