diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-17 15:27:04 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:10 -0300 |
commit | 1718683016c3d5487ed9ff5eca1377c295d638ed (patch) | |
tree | d80cb6ce163e9aa1d36c158ad496ebde12a05be8 /railties | |
parent | e8915d098c7ed1d652b0abb0fa646770627cd60f (diff) | |
download | rails-1718683016c3d5487ed9ff5eca1377c295d638ed.tar.gz rails-1718683016c3d5487ed9ff5eca1377c295d638ed.tar.bz2 rails-1718683016c3d5487ed9ff5eca1377c295d638ed.zip |
Do not generate app/assets directory for api apps
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 6 | ||||
-rw-r--r-- | railties/test/generators/api_app_generator_test.rb | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index d0e957037a..0c2d333b3f 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -259,6 +259,12 @@ module Rails build(:vendor) unless options[:api] end + def delete_app_assets_if_api_option + if options[:api] + remove_dir 'app/assets' + end + end + def delete_js_folder_skipping_javascript if options[:skip_javascript] remove_dir 'app/assets/javascripts' diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index 3c0c8054a4..1f4d2c41b0 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -74,7 +74,8 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase end def skipped_files - %w(config/initializers/assets.rb + %w(app/assets + config/initializers/assets.rb config/initializers/cookies_serializer.rb config/initializers/session_store.rb vendor/assets |