Module: MappingsHelper
- Defined in:
- app/helpers/mappings_helper.rb
Overview
MappingsHelper
Instance Method Summary collapse
- #attribute_collection ⇒ Object
- #delimiter_suggestion(import, header) ⇒ Object
- #mapping_suggestion(import, header) ⇒ Object
Instance Method Details
#attribute_collection ⇒ Object
5 6 7 8 9 10 |
# File 'app/helpers/mappings_helper.rb', line 5 def attribute_collection attrs = Element.importable.map(&:solr_field).sort attrs.prepend("") attrs.prepend("Discard") attrs end |
#delimiter_suggestion(import, header) ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/helpers/mappings_helper.rb', line 20 def delimiter_suggestion(import, header) if import.mapping_configuration.include?(header.to_sym) import.mapping_configuration[header.to_sym][:delimited] else false end end |
#mapping_suggestion(import, header) ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/helpers/mappings_helper.rb', line 12 def mapping_suggestion(import, header) if import.mapping_configuration.include?(header.to_sym) import.mapping_configuration[header.to_sym][:destination] else false end end |