Skip to content

Commit

Permalink
🧹 updates logic for #define_dynamic_methods
Browse files Browse the repository at this point in the history
The previously incorrect logic would prevent methods from being defined properly.
  • Loading branch information
ShanaLMoore committed Jul 10, 2024
1 parent 03966b5 commit 4f24cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/hyrax/work_show_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def define_dynamic_methods

multi_value = property_details.dig("multi_value")

unless self.class.method_defined?(method_name) || solr_document.respond_to?(method_name)
unless self.class.method_defined?(method_name) && solr_document.respond_to?(method_name)
self.class.send(:define_method, method_name) do
index_keys.each do |index_key|
value = solr_document[index_key]
Expand Down

0 comments on commit 4f24cbd

Please sign in to comment.