method

exists?

Importance_1
v3.2.13 - Show latest stable - 0 notes - Class: ActiveResource::Base
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
Show source
Register or log in to add new notes.