I have a setup with an admin_controller that allows the editing of
details for users on the site with a manage_user method. This I have set
up to use in-place editing in the same manner as "Rails Recipes.",
also
including the in-place editing validation described here:
http://www.ruby-forum.com/topic/60342#new
When trying to update a user record, an error pops up and the following
appears in the development log:
Processing AdminController#set_user_name (for 127.0.0.1 at 2007-09-25
14:06:44) [POST]
Session ID: 0c4a9ab51fa6851c042e1fb38d317b3c
Parameters: {"action"=>"set_user_name",
"id"=>"1",
"controller"=>"admin", "value"=>"Joe
User."}
NoMethodError (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.+):
/usr/lib64/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/locking/optimistic.rb:64:in
`update_without_callbacks''
/usr/lib64/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:267:in
`update_without_timestamps''
....and so on.
I have attached the rest in case they are of use.
Does anyone have any ideas as to where I should be looking for the cause
of this?
Attachments:
http://www.ruby-forum.com/attachment/392/error.txt
--
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---