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:




  1. how i tell person activeresource vigilant has_many articles?


  2. will articles.find(:first).author work? belongs_to even work given there's activerecord funding table?




Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?