我正在尝试为用户创建一封邮件,其中包含一个简单的 html 表单。为此,我按照http://edgeguides.rubyonrails.org/action_mailer_basics.html#example-action-mailer-configuration教程中的建议使用 Rails 3 中的 ActionMailer
我无法在邮件程序 erb 文件中使用诸如 form_tag 之类的 ActionView 助手。如何在 erb 文件中访问它们。
我的 user.html.erb 文件有这样的代码:
<%= form_tag(:controller => "application", :action => "parent_select", :method=>"put") do %>
Want To Attend
<%= check_box_tag(:yes, '1', request.priority != 0) %>
<% end %>
我收到此错误:
undefined method `protect_against_forgery?' for #<#<Class:0xa0874c4>:0xa085a70>