Class: Alchemy::IngredientAssociation
- Inherits:
-
ActiveRecord::Associations::BelongsToAssociation
- Object
- ActiveRecord::Associations::BelongsToAssociation
- Alchemy::IngredientAssociation
- Defined in:
- lib/alchemy/essence.rb
Overview
A bogus association that skips eager loading for essences not having an ingredient association
Instance Method Summary collapse
-
#klass ⇒ Object
Skip eager loading if called by Rails’ preloader.
Instance Method Details
#klass ⇒ Object
Skip eager loading if called by Rails’ preloader
9 10 11 12 13 14 15 |
# File 'lib/alchemy/essence.rb', line 9 def klass if caller.any? { |line| line =~ /preloader\.rb/ } nil else super end end |