Module: Hydra::BlacklightHelperBehavior
- Includes:
- Blacklight::BlacklightHelperBehavior
- Included in:
- BlacklightHelper
- Defined in:
- app/helpers/hydra/blacklight_helper_behavior.rb
Instance Method Summary collapse
-
#type_field_to_partial_name(document, display_type) ⇒ String
Given a Fedora uri, generate a reasonable partial name Rails thinks that periods indicate a filename, so escape them with slashes.
Instance Method Details
#type_field_to_partial_name(document, display_type) ⇒ String
Given a Fedora uri, generate a reasonable partial name Rails thinks that periods indicate a filename, so escape them with slashes.
17 18 19 20 |
# File 'app/helpers/hydra/blacklight_helper_behavior.rb', line 17 def type_field_to_partial_name(document, display_type) str = Array(display_type).join(' '.freeze).underscore str.parameterize(separator: '_'.freeze) end |