protected Method

Base.create

Create (i.e., save to the remote service) the new resource.

Source Code

# File active_resource/base.rb, line 817
def create
  returning connection.post(collection_path, to_xml, self.class.headers) do |response|
    self.id = id_from_response(response)
    load_attributes_from_response(response)
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.