aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorPaul <TheAssailant@users.noreply.github.com>2018-04-13 09:40:48 -0400
committerGitHub <noreply@github.com>2018-04-13 09:40:48 -0400
commitb17cdfe8e08fe09522e70bb767c0d9c06be0c55a (patch)
tree47961c466392b116a7ed0c6db16ab9b4691f56f0 /railties
parent57fe81200f1b645acd62ec004b4664944a3fbf68 (diff)
downloadrails-b17cdfe8e08fe09522e70bb767c0d9c06be0c55a.tar.gz
rails-b17cdfe8e08fe09522e70bb767c0d9c06be0c55a.tar.bz2
rails-b17cdfe8e08fe09522e70bb767c0d9c06be0c55a.zip
Add .keep exception for storage folder
Fixes https://github.com/rails/rails/issues/32546 by including the `.keep` file in the .gitignore, bringing the `storage` folder in line with the `tmp` and `log` folders.
Diffstat (limited to 'railties')
-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