我的代码产生unexpected kRETURN
错误。我认为这是一个HAML问题,但我不知道为什么或如何解决它:
SyntaxError in MeasurementsController#index
D:/myAppName/app/helpers/application_helper.rb:1: syntax error, unexpected kRETURN
module ApplicationHelper
def flash_helper
return if flash.blank?
out = ""
flash.each do |key, msg|
out += "<div class='flash #{key}'>#{msg}</div>"
end
raw out
end
def comment
# do nothing (ruby functions will always take a block)
end
def assets_server
case Rails.env
when /production|_prod|prd/i
"assets"
when /tqa/i
"assets-tqa"
else
"assets-dev"
end
end
end
我安装了这些宝石: