# Show validation error messages from a nested model?

**URL:** <https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530>\
**Category:** Rails\
**Created:** [August 11, 2009, 4:48am UTC](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530 "2009-08-11T04:48:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coolmenu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Post date:** [August 11, 2009, 4:48am UTC](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530/1 "2009-08-11T04:48:01Z")

</div>

I’m trying to get error messages from a child object to show up on the  
view page of the parent object. Line #7 of show view is what I’m  
trying to do. What am I missing? If I enter a comment that is less  
than 30 characters, I should see some validation errors, no? Thanks  
for any help.

[http://gist.github.com/165593](http://gist.github.com/165593)

---

<div class="post-metadata">

**Author:** ![coolmenu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Post date:** [August 11, 2009, 7:04am UTC](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530/2 "2009-08-11T07:04:57Z")

</div>

Hi

```
format.html { render :action => "new" } this says to render new 

```

action of comments controller Is that you need or you have to render  
show action of movie If that then you can say

render :action =\> “…/movies/show”

instaed of format.html { render :action =\> “new” }

Sijo

---

<div class="post-metadata">

**Author:** ![coolmenu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Post date:** [August 11, 2009, 5:55pm UTC](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530/3 "2009-08-11T17:55:55Z")

</div>

I see what you’re saying. I need to redirect from comments controller  
right back to where I was (show action of movies controller). But  
with the render, how do I specify the id to the movie that I’m  
returning to? Thanks for the help.
