Sha256: a37ef35a468623360233a9d26c8e4f2dc4dc12245d8e982ff9514f6b9479d9b0

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

module Spotlight
  module AppearancesHelper
    def translate_sort_fields(sort_config)
      if sort_config[:sort]
        safe_join(sort_config[:sort].split(',').map do |sort|
          sort_field, sort_order = sort.split(' ')
          safe_join([
            t(:"spotlight.appearances.edit.sort_fields.sort_keys.#{sort_field}"),
            t(:"spotlight.appearances.edit.sort_fields.sort_keys.#{sort_order}")
          ], " ")
        end, ", ")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-spotlight-0.2.0 app/helpers/spotlight/appearances_helper.rb