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
|
end
|
||||||
|
|
||||||
def assets_gemfile_entry
|
def assets_gemfile_entry
|
||||||
return [] if options[:skip_sprockets] || options[:api]
|
return [] if options[:skip_sprockets]
|
||||||
|
|
||||||
gems = []
|
gems = []
|
||||||
gems << GemfileEntry.version('sass-rails', '~> 5.0',
|
gems << GemfileEntry.version('sass-rails', '~> 5.0',
|
||||||
|
@ -280,7 +280,7 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
def javascript_gemfile_entry
|
def javascript_gemfile_entry
|
||||||
if options[:skip_javascript] || options[:api]
|
if options[:skip_javascript]
|
||||||
[]
|
[]
|
||||||
else
|
else
|
||||||
gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry]
|
gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry]
|
||||||
|
|
|
@ -191,7 +191,7 @@ module Rails
|
||||||
|
|
||||||
# Force sprockets to be skipped when generating http only app.
|
# Force sprockets to be skipped when generating http only app.
|
||||||
# Can't modify options hash as it's frozen by default.
|
# 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
|
end
|
||||||
|
|
||||||
public_task :set_default_accessors!
|
public_task :set_default_accessors!
|
||||||
|
|
Loading…
Reference in a new issue