Skip to content

Commit

Permalink
Merge pull request #6125 from avalonmediasystem/move_override
Browse files Browse the repository at this point in the history
Make override explicit by doing it in the original module in an initializer
  • Loading branch information
cjcolvar authored Nov 18, 2024
2 parents db0da17 + 3bff6e4 commit ecb7995
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/helpers/blacklight/local_blacklight_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ def facet_group_names
blacklight_config.facet_fields.map {|facet,opts| opts[:group]}.uniq
end

def url_for_document doc, options = {}
SpeedyAF::Base.for(doc.to_h.with_indifferent_access)
end

def contributor_index_display args
args[:document][args[:field]].first(3).join("; ")
end
Expand Down
8 changes: 8 additions & 0 deletions config/initializers/blacklight.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'blacklight'
Rails.application.config.to_prepare do
module Blacklight::UrlHelperBehavior
def url_for_document doc, options = {}
SpeedyAF::Base.for(doc.to_h.with_indifferent_access)
end
end
end

0 comments on commit ecb7995

Please sign in to comment.