Displaying 1 result from an estimated 1 matches for "expenses_path".
2009 Nov 18
4
rails newbie : routing error
...and created a unique index, since
db:migrated created an id object and made it as primary key. Now in
the
def create
@expense = Expense.new(params[:expense])
if @expense.save
flash[:viola] = ''New expense saved.. be frugal, save during this
bad economy''
redirect_to expenses_path
else
render :action => ''new''
#redirect_to new_expense_path
end
Here I try to save, and if any error, render action =>''new''. When I do
that I get the
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use...