I'm trying to create a list of user "ads" on my home page in my app.
But I don't get it to work. I'm a rails noob so it might be something
I'm currently running into this error:
Couldn't find User without an ID
My pages controller where to home action is looks like this:
@title = "Startsidan"
@user = User.find(params[:id])
@ads = @user.Ad.paginate(:page => params[:page])
And my ad partial looks like this:
<div class="ad body_copy">
<%= image_tag user.avatar.url(:thumb) %>
<%= link_to user.name, user %>
<%= user.ads.content %>
Any help would be appreciated! I hope that my explanation is clear