Module: ContextIO::API::AssociationHelpers

Defined in:
lib/contextio/api/association_helpers.rb

Class Method Summary collapse

Class Method Details

.associationsObject



12
13
14
# File 'lib/contextio/api/association_helpers.rb', line 12

def self.associations
  @associations ||= {}
end

.class_for_association_name(association_name) ⇒ Object



4
5
6
# File 'lib/contextio/api/association_helpers.rb', line 4

def self.class_for_association_name(association_name)
  associations[association_name]
end

.register_resource(klass, association_name) ⇒ Object



8
9
10
# File 'lib/contextio/api/association_helpers.rb', line 8

def self.register_resource(klass, association_name)
  associations[association_name] = klass
end