Skip to content

Commit

Permalink
Allow the partial search paths to be logged for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed May 30, 2014
1 parent df3e5ba commit 3ee1d37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/blacklight/blacklight_helper_behavior.rb
Expand Up @@ -505,7 +505,9 @@ def render_document_partial(doc, base_name, locals = {})
# XXX rather than handling this logic through exceptions, maybe there's a Rails internals method
# for determining if a partial template exists..
begin
return render :partial => (str % { :action_name => base_name, :format => format, :index_view_type => document_index_view_type }), :locals=>locals.merge(:document=>doc)
partial = str % { action_name: base_name, format: format, index_view_type: document_index_view_type }
logger.debug "Looking for document partial #{partial}"
return render partial: partial, locals: locals.merge(document: doc)
rescue ActionView::MissingTemplate
nil
end
Expand Down

0 comments on commit 3ee1d37

Please sign in to comment.