Class: Sfn::Company
- Inherits:
-
Resource
- Object
- HasSatisfaction
- Resource
- Sfn::Company
- Defined in:
- lib/satisfaction/company.rb
Instance Attribute Summary
Attributes inherited from Resource
Attributes inherited from HasSatisfaction
Instance Method Summary collapse
Methods inherited from Resource
decode_sfn, #delete, #initialize, #inspect, #load, #loaded?, #put, #was_loaded
Methods included from Util
Methods included from Resource::Attributes
Methods included from Associations
Methods inherited from HasSatisfaction
Constructor Details
This class inherits a constructor from Sfn::Resource
Instance Method Details
#path ⇒ Object
5 6 7 |
# File 'lib/satisfaction/company.rb', line 5 def path "/companies/#{@id}" end |
#setup_associations ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/satisfaction/company.rb', line 9 def setup_associations has_many :people, :url => "#{path}/people" has_many :topics, :url => "#{path}/topics" has_many :products, :url => "#{path}/products" has_many :employees, :url => "#{path}/employees", :class_name => 'Sfn::Person' has_many :tags, :url => "#{path}/tags" end |