Forum: Ruby on Rails How does controller call render when there's no render in action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
79ad5a1770c5cf086735a10ef7db6598?d=identicon&s=25 Vojto (Guest)
on 2009-06-06 13:18
(Received via mailing list)
Hello,

I was studying Rails source and at this point:

def process(request, response, method = :perform_action, *arguments)
#:nodoc:
        response.request = request

        initialize_template_class(response)
        assign_shortcuts(request, response)
        initialize_current_url
        assign_names

        log_processing
        send(method, *arguments)

        send_response

I have a question.

"send(method, *arguments)" this calls action of a controller, right?
But if there's no 'render' in action - how does it automatically call
render and renders the template for the action?

Thanks a lot
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-06-06 15:02
(Received via mailing list)
On Jun 6, 12:17 pm, Vojto <zero0...@gmail.com> wrote:

> I have a question.
>
> "send(method, *arguments)" this calls action of a controller, right?

not quite - (at least in the common) case, the method that gets called
is perform_action, which calls default_render if you have not called
render.

Fred
79ad5a1770c5cf086735a10ef7db6598?d=identicon&s=25 Vojto (Guest)
on 2009-06-07 14:14
(Received via mailing list)
Sweet,

so I totally missed perform_action method :)

Thanks :)

On Jun 6, 3:01 pm, Frederick Cheung <frederick.che...@gmail.com>
This topic is locked and can not be replied to.