Displaying 1 result from an estimated 1 matches for "04a84541".
2006 Jun 22
1
finding one db entry and how to display it in a view
Here is my controller:
class BrowseController < ApplicationController
def index
@products = Product.find(:all)
end
def item
@products = Product.find(:all, :conditions => "id = #{params[:id]}")
end
end
---
the ''item'' method is bothering me, because I know I should be able to
simply do:
def item
@product = Product.find(params[:id])