aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-05-14 18:17:20 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-06-11 16:54:15 -0300
commit37507d3b837308915748c05cca8b8d41c0b469f9 (patch)
tree2857b57c049724dd534c83db6d927e7d01db0c71
parent03b576ee06ec5fe9f980dfa07c16cdbbadd7d6e2 (diff)
downloadrails-37507d3b837308915748c05cca8b8d41c0b469f9.tar.gz
rails-37507d3b837308915748c05cca8b8d41c0b469f9.tar.bz2
rails-37507d3b837308915748c05cca8b8d41c0b469f9.zip
Document Generators.api_only! method
-rw-r--r--railties/lib/rails/generators.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index 68d2a121fd..b430cf1909 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -103,6 +103,10 @@ module Rails
@fallbacks ||= {}
end
+ # Configure generators for API only applications. It basically hides
+ # everything that is usually browser related, such as assets and session
+ # migration generators, and completely disable views, helpers and assets
+ # so generators such as scaffold won't create them.
def self.api_only!
hide_namespaces "assets", "helper", "css", "js"