RoR newbie needs help with instance variables and view

While you are creating the Product, you are not creating and associating the Categories, or populating the instance variable for the view. Try something like:

Controller

  def create     @product = Product.new(params[:product])     if @product.save        @category = @product.category # Add this line.        flash[:notice] = 'Product was successfully created.'       redirect_to :action => 'timeframe'     else       render :action => 'new'     end   end