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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -