mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
api option implies skipping javascript & sprockets
This commit is contained in:
parent
c09a401660
commit
e8915d098c
2 changed files with 3 additions and 3 deletions
|
@ -252,7 +252,7 @@ module Rails
|
|||
end
|
||||
|
||||
def assets_gemfile_entry
|
||||
return [] if options[:skip_sprockets] || options[:api]
|
||||
return [] if options[:skip_sprockets]
|
||||
|
||||
gems = []
|
||||
gems << GemfileEntry.version('sass-rails', '~> 5.0',
|
||||
|
@ -280,7 +280,7 @@ module Rails
|
|||
end
|
||||
|
||||
def javascript_gemfile_entry
|
||||
if options[:skip_javascript] || options[:api]
|
||||
if options[:skip_javascript]
|
||||
[]
|
||||
else
|
||||
gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry]
|
||||
|
|
|
@ -191,7 +191,7 @@ module Rails
|
|||
|
||||
# Force sprockets to be skipped when generating http only app.
|
||||
# Can't modify options hash as it's frozen by default.
|
||||
self.options = options.merge(skip_sprockets: true).freeze if options[:api]
|
||||
self.options = options.merge(skip_sprockets: true, skip_javascript: true).freeze if options[:api]
|
||||
end
|
||||
|
||||
public_task :set_default_accessors!
|
||||
|
|
Loading…
Reference in a new issue