search for: set_current_us

Displaying 2 results from an estimated 2 matches for "set_current_us".

Did you mean: get_current_cs
2008 Mar 08
1
Session empty after request
...39;'m doing wrong here? it ''should try to set the current user from the session'' do controller.session[SessionKeys::USER_ID] = 1 user = mock_model(User) User.stub!(:find).and_return(user) User.should_receive(:find).with(1).and_return(user) controller.should_receive(:set_current_user) do_request end When I watch the spec with my debugger, when it gets to the code, the session is empty, and the spec fails. What would be causing this? Am I setting the session wrong? I have also tried just session, and request.session with the same results. Thanks, Steve
2006 Jan 16
16
acts_as_authenticated current_user in a model?
What do I need to do to be able to use an acts_as_authenticated current_user in a model? Is there some sort of include or require I can do some where that would allow this? ********************************************************** Here is what I am trying to do: ********************************************************** class Setting < ActiveRecord::Base before_create :created_by_user #