Skip to content

Commit

Permalink
Refactor #render_document_class to be more lenient about what types i…
Browse files Browse the repository at this point in the history
…t can accept
  • Loading branch information
cbeer committed Apr 13, 2015
1 parent d833a86 commit 511e9e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/blacklight/catalog_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def render_document_class(document = @document)

return if types.blank?

Array(types).map do |t|
document_class_prefix + t.parameterize rescue nil
Array(types).compact.map do |t|
"#{document_class_prefix}#{t.try(:parameterize) || t}"
end.join(' ')
end

Expand Down

0 comments on commit 511e9e2

Please sign in to comment.