rest - Rails views: missing template after render called following failed validation with nested resources -


i'm trying work failed validations in rails 3.

i have chapters resource, nested comments. there 1 view in total; show view chapters_controller, contains form post new comment , points comments_controller create action follows (controller code included):

http://pastie.org/1338126

when fails validation, incorrectly routes to: '/chapters/1/comments' , displays following on page:

 template missing  missing template http://localhost:3000/chapters/1 {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:rhtml, :rxml, :builder, :erb, :rjs]} in view paths "/app/views", "", "/" 

cheers

paul

for in future, had similar problem.

i trying render when validation failed address create action:

render new_user_address_path(@user) #normally should work redirect_to or link_to render doesn't work way 

instead should:

render 'new' 

as @ideaasylum mentioned, can't render "named helper" can render action. me, seems idiosyncrasy rails. technically named path , action should go same place.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -