Tony Augustine wrote:
> Xavier Noria wrote:
>> On Thu, Feb 25, 2010 at 6:14 AM, Tony Augustine <li...@ruby-forum.com> 
>> wrote:
>> 
>>> i �just �created an application �to list the �primary �details of
>>> userbut it is �showing an error lik this
>>> "uninitialized constant UsersController::User"
>> 
>> Is the user model defined in app/models/user.rb ?
> 
> yes it is  defined in app/models/User.rb ?

 i  changed     but now its   showing this   error




 Showing app/views/users/index.html.erb where line #13 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each

Extracted source (around line #13):

10:     <th>Hobby</th>
11:   </tr>
12:
13: <% @user.each do |user| %>
14:   <tr>
15:     <td><%=h user.name %></td>
16:     <td><%=h user.age %></td>
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to