Browse Source

Add Rails 5.2 Version to Friendly Id Migration (#51)

darkrubyist 6 years ago
parent
commit
ce69db531a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      template.rb

+ 6 - 0
template.rb

@@ -185,6 +185,12 @@ end
 
 
 def add_friendly_id
 def add_friendly_id
   generate "friendly_id"
   generate "friendly_id"
+
+  insert_into_file(
+    Dir["db/migrate/**/*friendly_id_slugs.rb"].first,
+    "[5.2]",
+    after: "ActiveRecord::Migration"
+  )
 end
 end
 
 
 def stop_spring
 def stop_spring