You can pretty much feed it any of the standard find options, so
:conditions=>["user_id = ?", user] might work.
On Wednesday, April 19, 2006, at 10:07 PM, Vince W.
wrote:>I''m messing with the agiles store example. I added a field in my
>product table (user_id) that is also a foreign key relationship via
>fk_products_user
>
>In my scaffold I''d like to list the products as usual, but only
those
>products from the logged in user. I assume that would be done in the
>controller..
>
>How would I extend the basic controller:
>
> def list
> @product_pages, @products = paginate :products, :per_page => 10
> end
>
>to Also account for the logged in user?
>
>Thanks..
>
>--
>Posted via http://www.ruby-forum.com/.
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
_Kevin
--
Posted with http://DevLists.com. Sign up and save your mailbox.