Displaying 4 results from an estimated 4 matches for "new_session_url".
2008 Jan 30
3
Order of the get call and xxx.should
Just out of curiosity, why is that the following .should calls have to
differ to work?
The first is a normal check on the if the user is redirected if not
logged in
=========
it "should redirect the user to the login screen" do
do_get
response.should redirect_to(new_session_url)
end
The second is checking to ensure that the proper user validation method
is called
=========
it "should validate the user" do
controller.should_receive(:authorized?).and_return(true)
do_get
end
**Note: These are specs from different describe blocks run under
different au...
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake
routes to make sure it was there and it was but for some reason
new_session doesn''t work.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group,
2008 May 06
12
Why before_filter is not working?
...efore_filter isn''t working for
my codes.
In my Application controller, I have this:
before_filter :login_required, :except =>
[:newacct, :create_newacct, :passwd_reset ]
def login_required
unless session[:user_id]
flash[:notice] = "Please log in"
redirect_to new_session_url
end
end
I have the passwd_reset method defined in my Users controller.
My intention is if I call the method /users/passwd_reset it should
skip executing the login_required method in the Application
Controller, which in turn skip the login screen.
The result I have is I keep getting the log...
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
...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 => &q...