Ruby on rails 在index.json.jbuilder中没有将字符串隐式转换为整数的类型错误
我正在使用Rails1.4.1和jbuilder 在Ruby on rails 在index.json.jbuilder中没有将字符串隐式转换为整数的类型错误,ruby-on-rails,json,ruby-on-rails-4,jbuilder,Ruby On Rails,Json,Ruby On Rails 4,Jbuilder,我正在使用Rails1.4.1和jbuilder 在index.json.jbuilder中输入代码 if @event_templates.count == 0 json.message "Not found" end 但它的错误是 Type Error no implicit conversion of String into Integer 如果我在索引页中给出simplejson.message“未找到”, 给同样的错误 我在这里做错了什么 但是同样的代码在show.jso
index.json.jbuilder
中输入代码
if @event_templates.count == 0
json.message "Not found"
end
但它的错误是
Type Error no implicit conversion of String into Integer
如果我在索引页中给出simplejson.message“未找到”
,
给同样的错误
我在这里做错了什么
但是同样的代码在show.json.jbuilder
json.message "Not found"
它是完整的
index.json.jbuilder
?Post pleaseshow.json.jbuilder
same-json.message“未找到”已解决,犯了一些小错误。干杯