Sorry if you have had this problem many times before. I just can''t seem to find the problem. I have a budget controller with a create action like this: def create # do some things if budget.save redirect_to(period_budgets_path(period)) else @budget = budget @expense = budget.expense @period = budget.period render :action => "new" end end When I try to save an invalid budget, I get a missing template error. Sorry, I don''t have the exact message with me now but it basically says ''missing template new.erb''. I do have a new.html.erb so I am not sure what is going wrong. If I use render :template => "budgets/new.html.erb" That kind of works, but I get a strange URL of: http://localhost:3000/periods/1/budgets.%23<budget:0xb719b18c> Why is render :action => "new" not working in my case? Again, I am sorry if this group has been inundated with similar questions, I am just completely stuck! Thank you! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 1, 10:13 am, Daryn <darynhol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> render :template => "budgets/new.html.erb" > > That kind of works, but I get a strange URL of:http://localhost:3000/periods/1/budgets.%23<budget:0xb719b18c>I think this is actually the route of the problem - the post is going to this url, which rails is interpreting as someone requesting a document with a non html format. What does your form look like ? Fred> > Why is render :action => "new" not working in my case? > > Again, I am sorry if this group has been inundated with similar > questions, I am just completely stuck! > > Thank you!-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.