# Render functionality

**URL:** <https://www.ruby-forum.com/t/render-functionality/109155>\
**Category:** Rails\
**Created:** [July 11, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/render-functionality/109155 "2007-07-11T23:31:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjf\_control](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@sjf\_control](https://www.ruby-forum.com/u/sjf_control)\
**Post date:** [July 11, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/render-functionality/109155/1 "2007-07-11T23:31:44Z")

</div>

I understand the difference between render and redirect (at least I  
think I do…)  
But there still seems to be some confusion in my mind between  
render :action =\> :some\_action  
and  
render :action =\> “some\_action”

It would seem the second form (with the action target in quotes) just  
renders “some\_action.rhtml”  
However, the first form using the colon fomat seems to call the action  
method – a direct contradiction of the explanation given in the  
Pragmatic Programmer’s Agile Web D. book (page 428).

If somebody has some explanation of how these two formats differ, I  
sure would appreciate a response.

Thanks,  
sjf

---

<div class="post-metadata">

**Author:** ![sjf\_control](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@sjf\_control](https://www.ruby-forum.com/u/sjf_control)\
**Post date:** [July 11, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/render-functionality/109155/2 "2007-07-11T23:42:46Z")

</div>

sjf,

On 7/11/07, sjf\_control [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I understand the difference between render and redirect (at least I  
> think I do…)  
> But there still seems to be some confusion in my mind between  
> render :action =\> :some\_action  
> and  
> render :action =\> “some\_action”

These are equivalent, it’s just that the first you are using a symbol  
(:symbol\_name) and the second you are using a string, but both lines  
will do the same thing.

> Thanks,  
> sjf
> 
> >

Javier G.

---

<div class="post-metadata">

**Author:** ![sjf\_control](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@sjf\_control](https://www.ruby-forum.com/u/sjf_control)\
**Post date:** [July 12, 2007, 3:49am UTC](https://www.ruby-forum.com/t/render-functionality/109155/3 "2007-07-12T03:49:11Z")

</div>

Hi,

sjf\_control wrote:

> there still seems to be some confusion in my mind between  
> render :action =\> :some\_action  
> and  
> render :action =\> “some\_action”
> 
> It would seem the second form (with the action target in quotes) just  
> renders “some\_action.rhtml”  
> However, the first form using the colon fomat seems to call the action  
> method

If you can supply a succinct test case that illustates this behavior,  
please  
do. There is not supposed to be a difference, but perhaps you’ve found  
a  
bug.

Best regards,  
Bill
