Displaying 1 result from an estimated 1 matches for "useradvert".
Did you mean:
useradverts
2006 Jul 02
5
Pretty URLs -> Routes
...=> ''front'' ,
:action => ''list'' ,
:filter => ''user''
front_controller.rb:
def list
@advert_pages, @adverts = paginate :adverts, :per_page => 10
@user = User.find(params[:id])
@userAdverts = @user.adverts.find(:all)
end
http://localhost:3009/dawie
where dawie is one of the users
gives me an error: Couldn''t find User without an ID
which makes sense.
My problem is that I don''t know how to set up my controller so it knows
that
http://localhost:3009/dawie
should r...