Hi.
In controller code I’m doing things like:
flash[:success] = “Customer {#@customer.name} has been deleted.”
I know how to escape html in views by using the h() method. How can I
do
the same thing here in the controller?
Thanks,
Zack
Hi.
In controller code I’m doing things like:
flash[:success] = “Customer {#@customer.name} has been deleted.”
I know how to escape html in views by using the h() method. How can I
do
the same thing here in the controller?
Thanks,
Zack
I don’t think you would do it there – instead, add
“h(flash[:success])” to your view. (Keep the presentation separate.)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs