Re: Update attributes

namwob
Fri, 16 Feb 2007 19:10:10 -0000

Here is the application TRACE:


/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/
i386/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/
base.rb:939:in `find_from_ids''
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/
i386/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/
base.rb:382:in `find''
#{RAILS_ROOT}/app/controllers/admin_controller.rb:45:in `edit_user''
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/
i386/bin/mongrel_rails:18


On Feb 16, 2:06 pm, "Mike Garey"
<random...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> what exact line is causing rails to throw that error?
>
> On 2/16/07, namwob <ebow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
>
>
> > The id does get passed.  Note from my dev.log file the parameters
> > getting passed:
>
> > Parameters:
{"user"=>{"name"=>"joseph",
> >
"hashed_password"=>"3708cf23bf5bcd14a2383a4fb24c4af1fb4fb352",
> > "user_type"=>"nelnet",
"user_role"=>"user"}, "commit"=>"
Update User
> > ", "action"=>"update_user",
"id"=>"11", "controller"=>"admin"}
>
> > id is listed, so it makes it to the controller.
>
> > On Feb 16, 2:01 pm, "Mike Garey"
<random...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > On 2/16/07, namwob
<ebow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > > I am a bit confused as to why I am getting an error updating
an
> > > > object.
>
> > > > This is the ERROR:  Couldn''t find User without an
ID
>
> > > before you start getting to the strange SQL call, try and find
out why
> > > an ID isn''t being passed.  At what line do you receive
this error? At
> > > the User.find(params[:id]) ? If so, find out why you''re
not getting a
> > > value for an id here, then try to figure out the next part.
>
> > > Mike