Passing @object into a rails partial render

Viewed 31878

I have a partial:

'profiles/_show.html.erb'

that contains code like

<%= @profile.fullname %>

I'm trying to render the partial but I'm not sure how to pass the @profile. I tried using local but apparently it sets 'profile' on my partial instead of '@profile'.

<%= render :partial => 'profiles/show', :locals => {:profile => @app.profile} %>

Is there anyway to pass it as @object instead of object, or is it designed this way?

5 Answers
Related