Ruby on Rails Sunday, November 21, 2010

Hello,

So let say I created this class with the following method that responds
to xml or json.

class UsersController < ApplicationController::Base

respond_to :html, :xml, :json

def index
respond_with(@users = User.all)
end

def create
@user = User.create(params[:user])
respond_with(@user, :location => users_url)
end
end


How do I call the create action from another app to interact with this
user controller class?

Is their any api package I use to do the call on create or something?

Thanks for any help.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment