Ruby on Rails Tuesday, January 12, 2016

Hey there,

I'm super new to RoR. I've been working on an eCommerce project for
practice. Currently my website has buyers and sellers. Each seller has
personal page.

I'm trying to figure out how to show each seller's listings on their
personal page. I don't know what to put in my controller

Here's what I got so far:

def shop
@listings = Listing.where(seller: User.find(params[:id,]))
@user = User.find(params[:id])
end



I hope that I'm making sense.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ec88a5afaf60d0a3ed6a0fe654eb640d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment