Method: Wings::OrmConverter.base_for
- Defined in:
- lib/wings/orm_converter.rb
.base_for(klass:) ⇒ Class
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Selects an existing base class for the generated valkyrie class
13 14 15 16 17 |
# File 'lib/wings/orm_converter.rb', line 13 def self.base_for(klass:) mapped_class = klass.try(:valkyrie_class) || ModelRegistry.reverse_lookup(klass) return mapped_class if mapped_class klass < Hydra::Works::WorkBehavior ? Hyrax::Work : Hyrax::Resource end |