[Rails] h() aka. html_escape in controller code?
Ed C.
defeated2k4 at gmail.com
Sat Jan 14 03:41:26 GMT 2006
I don't think you would do it there -- instead, add
"h(flash[:success])" to your view. (Keep the presentation separate.)
On 1/13/06, Zack Chandler <zackchandler at drainpatrol.com> wrote:
> 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
>
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
More information about the Rails
mailing list