mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
1 changed files with 4 additions and 4 deletions
|
@ -320,10 +320,10 @@ module Rails
|
|||
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 a new issue