Sha256: 84e0d5bce39fd286df390e0f6851014e5cc80cf2e40dc3011db6d7d3a89cd2ce

Contents?: true

Size: 548 Bytes

Versions: 15

Compression:

Stored size: 548 Bytes

Contents

class Sfn::Topic < Sfn::Resource
  attributes :subject, :style, :content, :reply_count, :follower_count, :company_id, :at_sfn
  attribute :last_active_at, :type => Time
  attribute :created_at, :type => Time
  attribute :author, :type => Sfn::Person
  
  def path
    "/topics/#{@id}"
  end
  
  def setup_associations
    has_many :replies, :url => "#{path}/replies"
    has_many :people, :url => "#{path}/people"
    has_many :products, :url => "#{path}/products"
    has_many :tags, :url => "#{path}/tags"
    
    belongs_to :company
  end

end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
nullstyle-ruby-satisfaction-0.4.0 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.3.0 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.4.0 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.4.1 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.4.2 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.4.3 lib/satisfaction/topic.rb
pius-ruby-satisfaction-0.4.4 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.7 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.5 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.4 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.3 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.2 lib/satisfaction/topic.rb
ruby-satisfaction-0.6.1 lib/satisfaction/topic.rb
ruby-satisfaction-0.3.0 lib/satisfaction/topic.rb
ruby-satisfaction-0.4.0 lib/satisfaction/topic.rb