[rspec-users] RSpec 2.4, named/restful routes falling apart...

Mike Mazur mmazur at gmail.com
Thu Jan 13 08:31:10 EST 2011


Hi,

On Thu, Jan 13, 2011 at 13:39, Jason Nah <jason.nah at gmail.com> wrote:
> I have the following defined in my routes file
>
> resources :users
>
> And a controller:
> class UsersController < ApplicationController
>    before_filter :load_user
>
>    def show
>       redirect_to(user_path(@user))
>    end
>    private
>    def load_user
>       @user = User.find(params[:id])
>    end
> end

Perhaps I'm missing something here, but doesn't this
UsersController#show redirect to itself the way this code is written?

Mike


More information about the rspec-users mailing list