protected Method

Base.id_from_response(response)

Takes a response from a typical create post and pulls the ID out

Source Code

# File active_resource/base.rb, line 831
def id_from_response(response)
  response['Location'][/\/([^\/]*?)(\.\w+)?$/, 1]
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.