samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
184 stars 124 forks source link

♻️ Favor method_missing over a raft of delegates #6763

Open jeremyf opened 6 months ago

jeremyf commented 6 months ago

It's like we're flooding a political convention with delegates. Instead of having all of those delegate methods, let's just implement method missing and pass things along to the SolrDocument.

The benefit is that as we incorporate dynamic metadata, we don't need to keep on adding delegate :this_property, to: :solr_document.

@samvera/hyrax-code-reviewers

dlpierce commented 6 months ago

I like this. I was surprised to still need to customize the presenter (and other files) when we have the metadata schema yaml files in place. However, I'm going to wait until after 5.0.1 to merge this.