Class: Associationist::Reflection::SingularReflection

Inherits:
ActiveRecord::Reflection::HasOneReflection
  • Object
show all
Defined in:
lib/associationist/reflection/singular_reflection.rb

Instance Method Summary collapse

Instance Method Details

#association_classObject



4
5
6
# File 'lib/associationist/reflection/singular_reflection.rb', line 4

def association_class
  Associations::SingularAssociation
end

#check_eager_loadable!Object



8
9
10
# File 'lib/associationist/reflection/singular_reflection.rb', line 8

def check_eager_loadable!
  raise "Virtual associations cannot be eager-loaded."
end

#configObject



20
21
22
# File 'lib/associationist/reflection/singular_reflection.rb', line 20

def config
  options[:associationist]
end

#constructable?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/associationist/reflection/singular_reflection.rb', line 12

def constructable?
  false
end

#has_cached_counter?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/associationist/reflection/singular_reflection.rb', line 16

def has_cached_counter?
  false
end