【发布时间】:2012-01-26 13:07:35
【问题描述】:
这是我的代码
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) ------^
如何在获取之前检查返回的文本是否只有有效字符?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 json activeresource activesupport