Sha256: a2f2fdb9c571992089d861383eadd51fc5bd3aedba3337d5c3003a4806a49376
Contents?: true
Size: 468 Bytes
Versions: 4
Compression:
Stored size: 468 Bytes
Contents
class Sfn::Person < Sfn::Resource attributes :name, :id, :photo, :tagline def setup_associations has_many :replies, :url => "#{path}/replies" has_many :topics, :url => "#{path}/topics" has_many :followed_topics, :url => "#{path}/followed/topics", :class_name => 'Sfn::Topic' end end class Me < Sfn::Person def path loaded? ? super : "/me" end def was_loaded(result) @id = self.attributes["id"] setup_associations end end
Version data entries
4 entries across 4 versions & 1 rubygems