A
A
Andrew Emelianenko2014-03-20 16:00:04
Ruby on Rails
Andrew Emelianenko, 2014-03-20 16:00:04

How to render another controller from a view?

Good day!
There was a task to render one page inside another. For example:
Let's say we have a controller that renders widgets, each widget has its own address with a parameter (for example: /widget/latests/10). Therefore, we need to render these widgets somewhere on other pages. Please tell me how it can be rendered in a view, something like this:

render url: latests_widget_path(10)
# или
render url: '/some_another_page.html'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question