John Shen
2008-Oct-01 01:10 UTC
ActionController::RequestForgeryProtection is included but helper methods not available for view?
I am getting following errors: undefined method `protect_against_forgery?'' for #<ActionView::Base: 0x32a571c> 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: <h3>Login</h3> 7: 8: <label for="user_login">Login email:</label><br/> 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:26:in `signup'' /usr/local/bin/mongrel_rails:16:in `load'' /usr/local/bin/mongrel_rails:16 protect_against_forgery? is a method defined in ActionController::RequestForgeryProtection and supposed to be made available as helper method through "helper_methods :protect_against_forgery?". But somehow my view is not picking up these helpers methods. Please help! I am stuck for several hours now trying to figure it out. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Oct-01 09:51 UTC
Re: ActionController::RequestForgeryProtection is included but helper methods not available for view?
> protect_against_forgery? is a method defined in > ActionController::RequestForgeryProtection and supposed to be made > available as helper method through > "helper_methods :protect_against_forgery?". But somehow my view is > not picking up these helpers methods. > > Please help! I am stuck for several hours now trying to figure it out.Do you have any plugins installed? This appears to work ok for me locally. Your best bet is probably to start a fresh test app, and see if you can repeat the problem there. If you can, then you can attach it to a ticket in lighthouse and try to figure out the solution with other contributors. If you can''t, then there''s something up with your application. Good luck. -- Cheers, Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
John Shen
2008-Oct-01 16:42 UTC
Re: ActionController::RequestForgeryProtection is included but helper methods not available for view?
I have following plugin installed, how any plugin could interfere with this? - act_as_list - engines - giberrish - savage_beast - simple_captcha - sql_session_store - tiny_mce - white_list - white_list_formatted_content - will_paginate Among those, all but sql_session_store, tiny_mce and white_list are introducted after I upgrade to rails 2.1.1 and adding new features. On Oct 1, 2:51 am, Michael Koziarski <mich...@koziarski.com> wrote:> > protect_against_forgery? is a method defined in > > ActionController::RequestForgeryProtection and supposed to be made > > available as helper method through > > "helper_methods :protect_against_forgery?". But somehow my view is > > not picking up these helpers methods. > > > Please help! I am stuck for several hours now trying to figure it out. > > Do you have any plugins installed? This appears to work ok for me > locally. Your best bet is probably to start a fresh test app, and see > if you can repeat the problem there. If you can, then you can attach > it to a ticket in lighthouse and try to figure out the solution with > other contributors. > > If you can''t, then there''s something up with your application. > > Good luck. > > -- > Cheers, > > Koz--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---