html escape - Using helper methods like html_escape in rails console -
i trying see going wrong encoding of variables in view. fire rails console , try do
$ 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' main:object how use h or html_escape in rails console?
you call through helper. methods private may need use send call them
helper.send(:html_escape, '123') helper.pluralize 3, 'user'
Comments
Post a Comment