RoR newbie needs help with instance variables and view

The problem here is that you're loading the categories in the 'new'
action but your form error page is shown in the 'create' action -
notice that your 'create' has no reference to @category in it. Now,
you are calling 'render :action => 'new'' which will cause the create
template to be rendered, but it will not load the categories.

You have a couple of options - you could put another '@categories =..'
statement in the 'create' action, but that would mean duplicating
code. The best options are to either use a before_filter (see http://
ClassMethods.html), or you can compress your create/new actions into

def new
   @categories = Category.find(:all, :order => "description asc")
     @product =[:product])
       flash[:notice] = 'Product was successfully created.'
       redirect_to :action => 'timeframe'
     @product =

You can then just put 'new' as your form action.

Hope that helps,