I recently decided to list everything usersin my Ruby On Rails application, since I could not figure out how to list them in any other way, I decided to use partial ones. My administration page has the following: just connected to my own admin controller:
<%= render :partial => User.find(:all) %>
Then I have a file with a name _user.html.erbin the view folder of my users. It contains the following:
<ul>
<% div_for @user.object_id do %>
<li><%= link_to user.username, user.username %></li>
<% end %>
</ul>
When the application starts and I go to the administration page, I get the following error:
undefined id method for 4: Fixnum
He talks about this because of this line (which is in the partial file):
<% div_for @user.object_id do %>
, ( , ). , @user, .
user354346