Sfoglia il codice sorgente

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

darkrubyist 6 anni fa
parent
commit
ce69db531a
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      template.rb

+ 6 - 0
template.rb

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