mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
usages of active resouce
This commit is contained in:
committed by
Xavier Noria
parent
8d1c642cae
commit
c62cb2f2fb
@@ -21,6 +21,15 @@ class Person < ActiveResource::Base
|
||||
end
|
||||
</ruby>
|
||||
|
||||
Now the Person class is REST enabled and can invoke REST services very similarly to how Active Record invokes
|
||||
life cycle methods that operate against a persistent store.
|
||||
|
||||
<ruby>
|
||||
# Find a person with id = 1
|
||||
ryan = Person.find(1)
|
||||
Person.exists?(1) # => true
|
||||
</ruby>
|
||||
|
||||
h3. Changelog
|
||||
|
||||
* July 30, 2011: Initial version by "Vishnu Atrai":http://github.com/vatrai
|
||||
Reference in New Issue
Block a user