README.md in parse-ruby-client-0.1.6 vs README.md in parse-ruby-client-0.1.7
- old
+ new
@@ -17,11 +17,11 @@
# Getting Started
## Installation
-`gem "parse-ruby-client", "~> 0.1.5"`
+`gem "parse-ruby-client", "~> 0.1.7"`
---
To get started, load the parse.rb file and call Parse.init to initialize the client object with
your application ID and API key values, which you can obtain from the parse.com dashboard.
@@ -83,9 +83,30 @@
```ruby
game_score = Parse::Object.new "GameScore", {
:score => 1337, :playerName => "Sean Plott", :cheatMode => false
}
+```
+
+### ActiveRecord-style Models
+
+I like ActiveRecord-style models, but I also want to avoid ActiveRecord-style model bloat. `Parse::Model` is just a subclass of `Parse::Object` that passes the class name into the `initialize` method.
+
+```ruby
+class Post < Parse::Model
+end
+```
+
+The entire source for `Parse::Model` is just seven lines of simple Ruby:
+
+```ruby
+module Parse
+ class Model < Parse::Object
+ def initialize
+ super(self.class.to_s)
+ end
+ end
+end
```
## Retrieving Objects
Individual objects can be retrieved with a single call to ```Parse.get()``` supplying the class and object id.