Skip to content

Commit

Permalink
Conditionally set rails version on migration
Browse files Browse the repository at this point in the history
  • Loading branch information
MaicolBen committed Oct 13, 2017
1 parent 6423aad commit b790a52
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DeviseTokenAuthCreate<%= user_class.pluralize %> < ActiveRecord::Migration<%= '[' << Rails::VERSION::STRING[0..2] << ']'%>
class DeviseTokenAuthCreate<%= user_class.pluralize %> < ActiveRecord::Migration<%= "[#{Rails::VERSION::STRING[0..2]}]" if Rails::VERSION::MAJOR > 4 %>
def change
create_table(:<%= user_class.pluralize.underscore %>) do |t|
## Required
Expand Down

0 comments on commit b790a52

Please sign in to comment.