2
我不能在''
如何在Ruby中使用'?
使用'
这得到语法错误:( 假设@ post.user.nickname是John
@message = @post.user.nickname + ''s post'
它必须是John's post
如何使用'
?
我不能在''
如何在Ruby中使用'?
使用'
这得到语法错误:( 假设@ post.user.nickname是John
@message = @post.user.nickname + ''s post'
它必须是John's post
如何使用'
?
尝试
@message = @post.user.nickname + "'s post"
或
@message = @post.user.nickname + '\'s post'
非常感谢你。 – HUSTEN 2013-02-14 07:24:12