Rick DeNatale
2008-Jan-17 00:24 UTC
It seems to be a restful_authentication bug (was Re: [Rails] Re: named route new_session not working)
On 1/16/08, Jimmy Palmer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > sorry for the ambiguity. I will work on being more descriptive. :) > > In the method access_denied in the file authenticated_system.rb from > restful athentication, it generates this: > > def access_denied > respond_to do |format| > format.html do > store_location > redirect_to new_session # <---- NOTICE > end > format.xml do > request_http_basic_authentication ''Web Password'' > end > end > end > > Everytime I hit a ''login_required'' area of the site I get this error: > > undefined local variable or method `new_session'' for > #<Admin::CategoriesController:0x18e93dc> > > I changed the new_session to new_session_url and it works fine but it > redirects it to http://localhost:3000/sessions/new instead of > http://localhost:3000/login. > > my routes look like this: > > map.with_options :controller => "sessions" do |page| > page.login "/login", :action => "new" > page.logout ''/logout'',:action => ''destroy'' > end > > > rake routes: > > new_session GET /session/new {:action=>"new", > :controller=>"sessions"} > > Seems like it should work. Am I missing something?Ahh, information. Okay, this definitely looks like a bug in the restful_authentication plugin. Look at the first comment here: http://agilewebdevelopment.com/plugins/restful_authentication This seems to have been introduced lately, the last time I used restful_authentication it generated redirect_to :controller => ''/session'', :action => ''new'' I don''t know if Rick has an official bug tracking site for his plugins (you''d think he''d be using Lighthouse <G>) so I''ve changed the subject in hopes he might be more likely to read this. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Apparently Analagous Threads
- Where can I get "authenticate_with_http_basic"?
- named route new_session not working
- Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
- Help with error - uninitialized constant AuthenticatedSystem::Base64
- Modifying the restful_authentication plugin / Classes creating instances of themselves.