Sha256: 2ae88b4502d4b8904f90be8b08a6b0e124a5507643ce157f6c98b31a6b4dbe20

Contents?: true

Size: 325 Bytes

Versions: 3

Compression:

Stored size: 325 Bytes

Contents

module PushType
  module AssetsHelper

    def asset_icon(asset)
      kind = case asset.file.mime_type
        when /\Aimage\/.*\z/ then 'image'
        when /\Aaudio\/.*\z/ then 'audio'
        when /\Avideo\/.*\z/ then 'video'
        else 'document'
      end
      "push_type/icon-file-#{ kind }.png"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
push_type_admin-0.1.1 app/helpers/push_type/assets_helper.rb
push_type_admin-0.1.0 app/helpers/push_type/assets_helper.rb
push_type_admin-0.1.0.beta3 app/helpers/push_type/assets_helper.rb