开发者

When using truncate I get the following error "index 113257 out of string"

What does this error mean? Here is the line of code that generates it

 apts[n开发者_开发知识库dex] = truncate(results[ndex][:public_note].to_s,:length => 300)

results is an array of activerecord objects


I figured out the problem. apts[ndex] is a activerecord object, what I wanted to do was assign the truncated value to apts[ndex][:public_note].

I have no idea what the error message meant, can anyone shed some light on it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜