rg
2007-Aug-23 18:58 UTC
"ArgumentError: Unknown key(s)" error when running controller test
Hello, I''m running through a user authentication tutorial (http:// www.aidanf.net/rails_user_authentication_tutorial) and am getting some baffling errors when running functional tests. Specifically, when running the test on my user controller, I get: ArgumentError: Unknown key(s): password_confirmation, username, password, email These keys are all defined in my model, either as database columns or using attr_accessor. The test method that produces the error uses the following request: post :signup, :user => { :username => "newbob", :password => "newpassword", :password_confirmation => "wrong" , :email => "newbob-pbC8P9QkocYAvxtiuMwx3w@public.gmane.org"} whereas other test methods use the following and run fine: post :login, :user=> { :username => "bob", :password => "not_correct" } So it seems the fields :password_confirmation and :email are somehow screwing things up. Any ideas as to why I might be getting this error and/or how to fix it? Thanks so much for any help you can provide. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Edgar Gonzalez
2011-Apr-03 21:15 UTC
Re: "ArgumentError: Unknown key(s)" error when running controlle
Almot 4 years after and the same thing is happening to me... did you remember how you solved it? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Edgar Gonzalez
2011-Apr-03 21:50 UTC
Re: "ArgumentError: Unknown key(s)" error when running controlle
ok the problem was, i wasnt getting the param Id correctly in my controller -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.