Sha256: 3c423d808285a0de8606bdb5149eeb46f34b31e80d721eb2d6498019bed1ffa4

Contents?: true

Size: 415 Bytes

Versions: 4

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

require 'action_dispatch/http/mime_type'

module MediaTypes
  module ActionPackIntegration

    module_function

    def register(registerable)
      mime_type = registerable.to_s
      symbol = registerable.to_sym
      synonyms = registerable.aliases

      Mime::Type.register(mime_type, symbol, synonyms)
    end
  end

  integrate ActionPackIntegration
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
media_types-1.0.0 lib/media_types/integrations/actionpack.rb
media_types-0.6.2 lib/media_types/integrations/actionpack.rb
media_types-0.6.1 lib/media_types/integrations/actionpack.rb
media_types-0.6.0 lib/media_types/integrations/actionpack.rb