Miked, Basically your var @employee is nil when you pass it to form_for(). That means Employees.find(params[:id]) is returning nil (either is not working, or the :id doesn't exist)...
As Patrick put, the model name is not standard (should be Employee) and finding by hand may also help. Cheers, Sazima On Oct 25, 4:32 pm, Miked <[EMAIL PROTECTED]> wrote: > Ok, totally no reason why I'm getting an error in this model update > and no other. HELP! > > CONTROLLER: > > # GET /employees/1/edit > def edit > @employee = Employees.find(params[:id]) > > end > > VIEW: > > <h1>Edit Employee</h1> > <div id="main-sub"> > <%= error_messages_for :employees %> > > <% form_for(@employee) do |f| %> > <table width="600" border="0"> > <tr> > <td class="label">Email: > </td> > <td><%= f.text_field :email %> (required, will be login to > intranet) > </td> > </tr> > > ROUTES: > > map.resources :employees > > All pretty standard stuff - what's going on? > > ERROR: > > NoMethodError in Employees#edit > > Showing employees/edit.html.erb where line #5 raised: > > You have a nil object when you didn't expect it! > The error occurred while evaluating nil.to_sym > > Extracted source (around line #5): > > 2: <div id="main-sub"> > 3: <%= error_messages_for :employees %> > 4: > 5: <% form_for(@employee) do |f| %> > 6: <table width="600" border="0"> > 7: <tr> > 8: <td class="label">Email: > > Thanks so much in advance! --~--~---------~--~----~------------~-------~--~----~ 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-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---