# Format.html {} and block

**URL:** <https://www.ruby-forum.com/t/format-html-and-block/137674>\
**Category:** Ruby\
**Created:** [May 15, 2008, 7:54am UTC](https://www.ruby-forum.com/t/format-html-and-block/137674 "2008-05-15T07:54:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [May 15, 2008, 7:54am UTC](https://www.ruby-forum.com/t/format-html-and-block/137674/1 "2008-05-15T07:54:39Z")

</div>

Hi  
I have code like  
format.html {redirect\_to :action =\> ‘define\_sd\_resolution\_ui’,:id =\>  
params[:id], :sd\_resolution\_id=\>params[:sd\_resolution\_id]}

Here if the format is html then i have to do  
@sd\_ticket\_resolution.errors.each\_full{|msg| flash[:notice]= msg } this  
also.  
ie,  
format.html {  
@sd\_ticket\_resolution.errors.each\_full{|msg| flash[:notice]= msg } this  
also.  
redirect\_to :action =\> ‘define\_sd\_resolution\_ui’,:id =\> params[:id],  
:sd\_resolution\_id=\>params[:sd\_resolution\_id]}

But this is error.How can I solve this?

Sijo

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [May 15, 2008, 9:13am UTC](https://www.ruby-forum.com/t/format-html-and-block/137674/2 "2008-05-15T09:13:14Z")

</div>

I solved it
