I actually now hard code the create method I want to invoke:

                    var options = {
                        type: 'POST',
                        url: "users/create",
                        dataType: 'json',
                        data: $('#sign-in form:first').serialize(),
                        error: function(xhr, textStatus, errorThrown) {
                            alert('An error occurred! ' + errorThrown);
                        },
                        success: function(data, textStatus) {
                            $('body').append( data );
                        }
                    };
                    $.ajax( options );

The server output is this:

Started POST "/users/create" for 127.0.0.1 at 2011-03-08 14:01:30 -0500

ActionController::RoutingError (No route matches "/users/create"):

The JavaScript allert triggers:
"An eror occurred! undefined"


I have this in routes:

   devise_for :user
  resources :users

Any idea what's going on?

-- 
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