Skip to content

Commit

Permalink
Make override explicit by doing it in the original module in an initi…
Browse files Browse the repository at this point in the history
…alizer
  • Loading branch information
cjcolvar committed Nov 18, 2024
1 parent db0da17 commit 3bff6e4
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 3bff6e4

Please sign in to comment.