Next newbie problem in Hartl's Tutorial. Now in chapter 7. . While I'm running App I'm getting something like this in my browser:
ActiveRecord::RecordNotFound in UsersController#show
Couldn't find User with id=1
Rails.root: C:/rails_project/my_app
Application Trace | Framework Trace | Full Trace
app/controllers/users_controller.rb:4:in `show'
Request
Parameters:
{"id"=>"1"}
Show session dump
Show env dump
Response
Headers:
None
My user_controller.rb looks like this:
class UsersController < ApplicationController
def show
@user = User.find(params[:id])
describe "profile page" do
#Code to make a user variable
before { visit user_path(user) }
it { should have_selector('h1', :text => user.name) }
it { should have_selector('title', :text => user.name) }
end
end
def new
end
end
Thanks for help & intrest!