gemfile entry method need to return an empty array rather than nil (#27318)
This fixes the following error when executing rails new command. ``` (erb):9:in `block in template': undefined method `comment' for nil:NilClass (NoMethodError) ``` Follow up to #27288
This commit is contained in:
parent
ecddc0468d
commit
c16296c795
@ -320,10 +320,10 @@ def assets_gemfile_entry
|
||||
end
|
||||
|
||||
def webpacker_gemfile_entry
|
||||
if options[:webpack]
|
||||
comment = "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
|
||||
GemfileEntry.github "webpacker", "rails/webpacker", nil, comment
|
||||
end
|
||||
return [] unless options[:webpack]
|
||||
|
||||
comment = "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
|
||||
GemfileEntry.github "webpacker", "rails/webpacker", nil, comment
|
||||
end
|
||||
|
||||
def jbuilder_gemfile_entry
|
||||
|
Loading…
Reference in New Issue
Block a user