【发布时间】:2016-10-26 07:13:06
【问题描述】:
我正在尝试将#xyz 添加到使用rails link_to 助手生成的链接中。
以下是我的代码:
<%= link_to('', edit_notification_path(:id => item.id,:type =>"requester_template",
:notification_type => @notification_type,:anchor => "#xyz"),
:class => 'icon-pencil-3' ) %>
但是生成的 URL 看起来像
email_notifications/3/edit/requester_template?notification_type=ticket#%23es
即有一个额外的 %23 与锚点一起添加。
我在这里做错了什么? (这里是 Rails 初学者)
【问题讨论】:
标签: ruby-on-rails link-to