【发布时间】:2018-04-21 06:08:55
【问题描述】:
我知道这很简单,但我需要将外部链接添加到 Rails 控制器 Flash 通知。现在我有这个
redirect_to root_path, flash[:success] = "Complete this quick survey. <a href='#{'http://google.com'}'>Click here</a>".html_safe
我不断收到错误
TypeError (no implicit conversion of Symbol into String):
正确的语法是什么?
我正在使用 ruby 2.2.1p85 和 Rails 4.0.10
【问题讨论】:
标签: html ruby-on-rails controller