search for: new_expense_path

Displaying 1 result from an estimated 1 matches for "new_expense_path".

2009 Nov 18
4
rails newbie : routing error
...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 object_id Extracted source (around line #1): 1: <% form_for @e1 do |er| %> 2: <p&...