这是我的代码
class Project < ActiveResource::Base
self.site = "https://xyz.unfuddle.com/api/v1"
def get_tickets
ticket_array = []
Project.all.each do |project|
project.get(:tickets).each do |ticket|
#save ticket or something
end
end
end
end
project.get(:tickets)
中发生错误lexical error: invalid character inside string.
16 ": "There is text that shouldn^Zt be there on the DVD/Blu-ray
17 (right here) ------^
如果返回的文本只有有效字符,我该如何检查?
答案 0 :(得分:1)
你需要获取数据。否则你将无法检查它的有效性。这就是为什么我只想添加一个try-catch-block并解决特定的错误。