【发布时间】:2013-03-01 17:29:45
【问题描述】:
我想看看在我看来我的变量编码出了什么问题。所以我启动了rails控制台并尝试做
$ rails console
Loading development environment (Rails 3.2.11)
irb(main):001:0> html_escape({:a=>1, :b=>"my str"})
NoMethodError: undefined method `html_escape' for main:Object
如何在 Rails 控制台中使用 h 或 html_escape?
【问题讨论】: