Html escape with hash options


I have some problem in html_escape function with hash option

I hope that below syntax shows that hash options.

In view.rhtml file.

html_escape(“Hello”,{:one = > “true”, :two => “false” })

In application_helper.rb

def html_escape (s, )

    l.each { |key,value|



alias h html_escape

I am getting the below error message when I am running the application.

ActionView::TemplateError (private method `gsub’ called for {}:Hash)
on line
#1 of app/views/sample/modify.rhtml:
1: <% form_for :text, @text, :url => { :action => ‘view’} do |f| %>

Pls give your suggestion to me.

Best Regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs