MyApp.controller :products do
get :show, :map => “/this-is/:id/cool” do @product = Product.find(params[:id])
render ‘products/show’
end
end
… I’m confused about the use of the symbol :products in the first
line and the instance variable @product in the 3rd line. Is :products a
parameter to the MyApp.controller method? If this is a method definition
how can an instance variable valid? I thought instance variables were
only valid within instances, ie. objects?