Ruby on rails 如何使用';用红宝石?
我不能在Ruby on rails 如何使用';用红宝石?,ruby-on-rails,ruby-on-rails-3,Ruby On Rails,Ruby On Rails 3,我不能在'中使用' 这将获取语法错误:( 假设@post.user.昵称是John @message = @post.user.nickname + ''s post' 必须是约翰的帖子 如何使用”?试试看 @message = @post.user.nickname + "'s post" 或 @message = @post.user.nickname + '\'s post'
'
中使用'
这将获取语法错误:(
假设@post.user.昵称是John
@message = @post.user.nickname + ''s post'
必须是约翰的帖子
如何使用”
?试试看
@message = @post.user.nickname + "'s post"
或
@message = @post.user.nickname + '\'s post'