Module: Shared::IsData::Metamorphosize
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/shared/is_data/metamorphosize.rb
Overview
Shared code for a classes that are “data” sensu TaxonWorks (things like Projects, users, and preferences are not data).
Instance Method Summary collapse
-
#metamorphosize ⇒ Object
The same object, but namespaced to the base class used many places, might be good target for optimization.
Instance Method Details
#metamorphosize ⇒ Object
Returns the same object, but namespaced to the base class used many places, might be good target for optimization.
10 11 12 13 |
# File 'app/models/concerns/shared/is_data/metamorphosize.rb', line 10 def return self if self.class.descends_from_active_record? self.becomes(self.class.base_class) end |