Post Meta

Bookmarks

  • Delicious
  • Digg
  • Reddit
  • Magnolia
  • Newsvine
  • Furl
  • Facebook
  • Technorati

By using the magic render_component.

Let’s say you have Tasks managed by ActiveScaffold. You want to show details of a task in another view/controller. If you use render :controller => :tasks won’t work, so you’ll have to:

<%= render_component :controller =>  "tasks", :action => "show", :id => @task.id %>


Related posts

Leave A Comment

+ -