开发者

Why non-English string is recognized in view but not in helper in Rails 3?

Why this:

<%= foo("Русский") %>

works in 开发者_如何学JAVAview, but this:

foo("Русский")

doesn't work in helper ?

Error: syntax error, unexpected $end, expecting ')'

File's encoding is UTF-8.


Try to add this line (must be first line) in your helper file:

# coding: utf-8
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜