开发者

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

开发者 https://www.devze.com 2022-12-31 18:27 出处:网络
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)

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

精彩评论

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