I’ve just updated to Rails 2.3.11. In an earlier version I could write the following
render :file=>'console/users/show.html.erb', :locals => {:@user => @users.first}
which no longer works, instead I need to write
render :file=>'console/users/show.html.erb', :locals => {:user => @users.first}
which means to access the user in the file I would use ‘user’ but in the file I would like to use the instance variable @user as this same show file is called from the controller and passes @user
Any tips?
Thanks
Set
@userbefore callingrender:The
:localsoption should only be used if you are passing local variables through.