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/helpers directory for api apps

This commit is contained in:
Santiago Pastorino 2015-04-17 15:28:52 -03:00
parent 1718683016
commit 9b66071a3e
2 changed files with 7 additions and 0 deletions

View file

@ -265,6 +265,12 @@ module Rails
end
end
def delete_app_helpers_if_api_option
if options[:api]
remove_dir 'app/helpers'
end
end
def delete_js_folder_skipping_javascript
if options[:skip_javascript]
remove_dir 'app/assets/javascripts'

View file

@ -75,6 +75,7 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase
def skipped_files
%w(app/assets
app/helpers
config/initializers/assets.rb
config/initializers/cookies_serializer.rb
config/initializers/session_store.rb