Skip to content

Commit

Permalink
Merge pull request #1430 from projectblacklight/presenter-deprecation
Browse files Browse the repository at this point in the history
#presenter() should fall back to previous behavior
  • Loading branch information
mejackreed committed Jul 5, 2016
2 parents 601d558 + e1930a9 commit 908066f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/blacklight/blacklight_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ def presenter(document)
when 'index'
index_presenter(document)
else
raise "Unable to determine presenter type for #{action_name} on #{controller_name}"
Deprecation.warn(Blacklight::BlacklightHelperBehavior, "Unable to determine presenter type for #{action_name} on #{controller_name}, falling back on deprecated Blacklight::DocumentPresenter")
presenter_class.new(document, self)
end
end

Expand Down

0 comments on commit 908066f

Please sign in to comment.