0

I have a route where the url facebook/get/:id will render a partial, with no layout, of the profile of a person from Facebook with the given id. The function facebook#get expects param[:id] to be set with the id of a profile.

In a different controller I wish to use the partial generated above with out repeating the code found in facebook#get but I am struggling. I have tried variations of render :template => "facebook/get" & render :action => "facebook/get" but nothing is working.

Is it best to figure out how to render this function or just copy the code to the new controller?

Blease
  • 1,380
  • 4
  • 38
  • 64
  • like [this](http://stackoverflow.com/a/3370372/1301840)? – lusketeer Jun 22 '16 at 22:23
  • @lusketeer not exactly, I want the code in `facebook#get` to be ran, which this does not do – Blease Jun 22 '16 at 22:28
  • 1
    not sure I follow, why not just use the same partial in the desired controller action view, and just pass in the object as one of the `locals`, post some codes of controllers and partials would help – lusketeer Jun 22 '16 at 22:32

0 Answers0