Hi,
I'm a trying to create a user using Ajax from a mobile app with
javascript and I'm struggling!!!

Here is what I'm trying:
user = {username:'plop', password:'plip', password_confirmation:'plip'};
new Ajax.Updater('all', HOST + 'users/create',{
  method: 'POST',
  parameters:{'user': user}
});

When I look at the log It seems that is doesn't recognize first that is
a POST method and it doesn't recognize my user parameter.

Here is the log:
Processing UsersController#create (for 127.0.0.1 at 2010-06-04 20:40:07)
[OPTIONS]
  Parameters: {"action"=>"create", "controller"=>"users"}

Here is how it should be:
Processing UsersController#create (for 127.0.0.1 at 2010-06-04 20:35:46)
[POST]
  Parameters: {"commit"=>"Submit", "action"=>"create",
"authenticity_token"=>"/fkA8CQVp88xDB1Tbf/T2OHldbpc0QQlsBk7yk/7mxA=",
"controller"=>"users", "user"=>{"password_confirmation"=>"[FILTERED]",
"username"=>"toto", "password"=>"[FILTERED]"}}



Greg
-- 
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 [email protected].
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.

Reply via email to