Class: Sfn::Tag

Inherits:
Resource show all
Defined in:
lib/satisfaction/tag.rb

Instance Attribute Summary

Attributes inherited from Resource

#id

Attributes inherited from HasSatisfaction

#satisfaction

Instance Method Summary collapse

Methods inherited from Resource

decode_sfn, #delete, #initialize, #inspect, #load, #loaded?, #put, #was_loaded

Methods included from Util

#requestify

Methods included from Resource::Attributes

included

Methods included from Associations

#belongs_to, #has_many

Methods inherited from HasSatisfaction

#initialize

Constructor Details

This class inherits a constructor from Sfn::Resource

Instance Method Details

#pathObject



4
5
6
# File 'lib/satisfaction/tag.rb', line 4

def path
  "/tags/#{@id}"
end

#setup_associationsObject



8
9
10
11
12
# File 'lib/satisfaction/tag.rb', line 8

def setup_associations
  has_many :topics, :url => "#{path}/topics"
  has_many :companies, :url => "#{path}/companies"
  has_many :products, :url => "#{path}/products"
end