how i emanate an activerecord charge an activeresource object?
let's contend i'm minute library concentration book association already application.
so library concentration i have
class chairman < activeresource::base
self.site = "http://api.people.mypublisher.com/"
end
and i wish store articles any person:
class essay < activerecord::base
belongs_to :person, :as => :author
end
i suspect i'd have following list database:
articles
id (pk) | due (string) | physique (text) | author_id (integer)
author_id isn't accurately foreign-key, given i don't have table. leaves several questions:
how i tell
personactiveresourcevigilanthas_manyarticles?will
articles.find(:first).authorwork?belongs_toeven work given there'sactiverecordfunding table?
Comments
Post a Comment