When I want to see my users, then I get:
-----------------------------------------------------
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Extracted source (around line #3):
1: <% @page_title = "Spisek uporabnikov" -%>
2: <table>
3: <% for user in @all_users %>
4: <tr>
5: <th><%= user.name %></th>
-----------------------------------------------------
that''s list_users.rhtml ^
and login_controller.rb ?
-----------------------------------------------------
def list_users
@all_users = User.find_all
end
-----------------------------------------------------
And I don''t understand what is wrong here .... ??
--
Posted via http://www.ruby-forum.com/.