aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-04-13 14:33:05 -0400
committerGitHub <noreply@github.com>2018-04-13 14:33:05 -0400
commit998da3cb3479c224279e165e00cb99556c3b4686 (patch)
tree3d8ee28f148926c15bb8748c11d7a46a6fc6a3c0
parent8c62aabc831766c530e63b2bdb8f6a30c866579c (diff)
parentb17cdfe8e08fe09522e70bb767c0d9c06be0c55a (diff)
downloadrails-998da3cb3479c224279e165e00cb99556c3b4686.tar.gz
rails-998da3cb3479c224279e165e00cb99556c3b4686.tar.bz2
rails-998da3cb3479c224279e165e00cb99556c3b4686.zip
Merge pull request #32561 from TheAssailant/storage-keep-gitignore
Add .keep exception for storage folder
-rw-r--r--railties/lib/rails/generators/rails/app/templates/gitignore.tt5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/gitignore.tt b/railties/lib/rails/generators/rails/app/templates/gitignore.tt
index 2cd8335aba..4e114fb1d9 100644
--- a/railties/lib/rails/generators/rails/app/templates/gitignore.tt
+++ b/railties/lib/rails/generators/rails/app/templates/gitignore.tt
@@ -24,8 +24,11 @@
<% unless skip_active_storage? -%>
# Ignore uploaded files in development
/storage/*
-
+<% if keeps? -%>
+!/storage/.keep
<% end -%>
+<% end -%>
+
<% unless options.skip_yarn? -%>
/node_modules
/yarn-error.log