I'm calling:
render @users, :layout => "homepage"
because I want to wrap the partial part by default for users (views / _user.html.erb) with a custom layout for the main page only (views / users / _homepage.html.erb).
but when I do this, I get a NoMethodError in the user.name method.
For some reason, it seems that the user variable is not getting the correct initialization inside the partial user.
It turned out that after some test, a partial part of the home page was not even called up; it partially passed directly to the user.
source
share