Put a link in a flash[:notice]

后端 未结 8 1480
天涯浪人
天涯浪人 2020-12-04 23:31

I am learning Ruby and Rails.

I have a Ruby on Rails project that tracks jobs a server is running. Right now, when I manually create a new job, it announces:

<
8条回答
  •  醉梦人生
    2020-12-05 00:28

    I may be missing something obvious, but you should just be able to do

    flash[:notice] = %Q[Created job number #{update.id}]
    

    and then just make sure you're not escaping the content of the flash when you display it in your view.

提交回复
热议问题