Module: Hyrax::ModelProxy
- Included in:
- CollectionPresenter, EmbargoPresenter, FileSetPresenter, LeasePresenter, TrophyPresenter, WorkShowPresenter
- Defined in:
- app/presenters/hyrax/model_proxy.rb
Overview
Provide the ActiveModel methods so that this object routes the same as the object represented by the solr document.
Instance Method Summary collapse
- #persisted? ⇒ Boolean
- #to_model ⇒ Object
-
#valid_child_concerns ⇒ Object
deprecated
Deprecated.
this isn’t related to the ModelProxy issue, and has been moved to ‘WorkShowPresenter`.
Instance Method Details
#persisted? ⇒ Boolean
9 10 11 |
# File 'app/presenters/hyrax/model_proxy.rb', line 9 def persisted? true end |
#to_model ⇒ Object
13 14 15 |
# File 'app/presenters/hyrax/model_proxy.rb', line 13 def to_model self end |
#valid_child_concerns ⇒ Object
Deprecated.
this isn’t related to the ModelProxy issue, and has been moved to ‘WorkShowPresenter`.
20 21 22 23 |
# File 'app/presenters/hyrax/model_proxy.rb', line 20 def valid_child_concerns Deprecation.warn "#{self.class}#valid_child_concerns will be removed in Hyrax 4.0." Hyrax::ChildTypes.for(parent: solr_document.hydra_model) end |