I recently upgrade to rails 2.1.1 from rails 1.2.3. When I create a
form, it generates this error when the form is displayed:
undefined method `protect_against_forgery?’ for #<ActionView::Base:
0x30cbd9c>
Extracted source (around line #5):
2:
3: Thank you for signing up at Specool.com. Your first time login
must be from within this email to properly activate your account.
After that, you may login directly at specool.com.
4:
5: <% form_tag :controller => “user”, :action=> “login” do %>
6:
Login
7:
8: Login email:
RAILS_ROOT: /Users/jianshen/jedmin/working_copies/qa_feature_site
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/
helpers/form_tag_helper.rb:433:in extra_tags_for_form' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/ helpers/form_tag_helper.rb:441:in
form_tag_html’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/
helpers/form_tag_helper.rb:447:in form_tag_in_block' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/ helpers/form_tag_helper.rb:39:in
form_tag’
app/views/notification/signup_validation.erb:5:in
_run_erb_47app47views47notification47signup_validation46erb' app/controllers/user_controller.rb:25:in
signup’
/usr/local/bin/mongrel_rails:16:in `load’
/usr/local/bin/mongrel_rails:16
I know protect_against_forgery? is defined in
ActionController::RequestForgeryProtection, but no where I can find it
is defined as a helper.
It is called from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/
lib/action_view/helpers/form_tag_helper.rb so I assume that this
should be available to all views. Maybe I didn’t loaded something
correctly?
Help is much appreciated!
John