1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Do not generate app/assets directory for api apps

This commit is contained in:
Santiago Pastorino 2015-04-17 15:27:04 -03:00
parent e8915d098c
commit 1718683016
2 changed files with 8 additions and 1 deletions

View file

@ -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'

View file

@ -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