Robert Dober wrote:
>
> On Tue, Nov 23, 2010 at 1:04 PM, Raghu Somaraju
> wrote:
>>
>> Thank you Robert. That works. I should have used the "current_user"
>> instead
>> of @_current_user in the first place.
>>
>> But, if I do want to use @_current_user, how do I pass on that instance
>> variabl
On Tue, Nov 23, 2010 at 1:04 PM, Raghu Somaraju wrote:
>
> Thank you Robert. That works. I should have used the "current_user" instead
> of @_current_user in the first place.
>
> But, if I do want to use @_current_user, how do I pass on that instance
> variable to the controller from spec?
Short
Thank you Robert. That works. I should have used the "current_user" instead
of @_current_user in the first place.
But, if I do want to use @_current_user, how do I pass on that instance
variable to the controller from spec?
Ignore the item_choice. It is a remnant of a piece that I edited off to
On Mon, Nov 22, 2010 at 1:24 PM, Raghunandan Somaraju
wrote:
> I need to update something for a logged in user. My controller code for the
> action is:
>
> def som_action
> �...@_current_user.save_choice(params)
> end
you are stubbing current_user, not @_current_user, thus this will
fail. Maybe it
I need to update something for a logged in user. My controller code for
the action is:
def som_action
@_current_user.save_choice(params)
end
My application_controller.rb contains the following:
class ApplicationController < ActionController::Base
before_filter :current_user
def current_