method

exists?

rails latest stable - Class: ActiveResource::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

exists?(id, options = {})
public

Asserts the existence of a resource, returning true if the resource is found.

Examples

Note.create(:title => 'Hello, world.', :body => 'Nothing more for now...')
Note.exists?(1) # => true

Note.exists(1349) # => false