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
sjf,
On 7/11/07, sjf_control [email protected] 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.
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