私は最近、Parse.com's REST APIのRuby APIラッパーであるParseResourceを書きました。APIラッパーのActiveRecordのような関連付けを実装する
は、ここではいくつかの基本的な使い方です:
class Post < ParseResource
fields :title, :author, :body
end
p = Post.create(:title => "Hello world", :author => "Alan", :body => "ipso lorem")
プロジェクトはかなり若いです、と私は本当に実装したい機能が団体です。このような何か:
class Author < ParseResource
has_many :posts
fields :name, :email
end
class Post < ParseResource
belongs_to :author
fields :title, :body
end
a = Author.create(:name => "Alan", :email => "[email protected]")
p = Post.create(:title => "Associated!", :body => "ipso lorem", :author => a)
p.author.class #=> Author
p.author.name #=> "Alan"
a.posts #=> an array of Post objects
私はパースのREST APIを把握している誰からも似たようなだけでなく、を実施したことのある人からのアドバイス、ポインタ、落とし穴が大好きです。
[nulldb](https://github.com/nulldb/nulldb)について聞いたことがありますか? –