diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-17 20:34:21 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:11 -0300 |
commit | c19035299a314380285addf6f269591dc648d5cf (patch) | |
tree | c0fc1925acf60600bbee4bd5227ad449a7658194 /railties/lib | |
parent | 101df203eb8e96a398792a3e3308e93c2fd96a47 (diff) | |
download | rails-c19035299a314380285addf6f269591dc648d5cf.tar.gz rails-c19035299a314380285addf6f269591dc648d5cf.tar.bz2 rails-c19035299a314380285addf6f269591dc648d5cf.zip |
Hide assets, helper, css and js namespaces for api only apps
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 96742dd2e6..b2f227595d 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -65,6 +65,7 @@ module Rails } def self.configure!(config) #:nodoc: + api_only! if config.api_only no_color! unless config.colorize_logging aliases.deep_merge! config.aliases options.deep_merge! config.options @@ -102,6 +103,10 @@ module Rails @fallbacks ||= {} end + def self.api_only! + hide_namespaces "assets", "helper", "css", "js" + end + # Remove the color from output. def self.no_color! Thor::Base.shell = Thor::Shell::Basic |