class ApiResource::Associations::RelationScope

Public Instance Methods

internal_object() click to toggle source

Use this method to access the internal data, this guarantees that loading only occurs once per object

# File lib/api_resource/associations.rb, line 255
def internal_object
  @internal_object ||= self.klass.send(:load_scope_with_options, self.current_scope, self.scopes[self.current_scope])
end
reload() click to toggle source
# File lib/api_resource/associations.rb, line 248
def reload
  remove_instance_variable(:@internal_object) if instance_variable_defined?(:@internal_object)
  self.klass.reload(self.current_scope, self.scopes[self.current_scope])
  self
end