Hi,
I have some problem in html_escape function with hash option
parameters.
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=Hash.new )
l.each { |key,value|
html_escape_newline(s).gsub(/\r\n/,"<br/>")
}
end
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,
Vichu