Method: Mime::Type.register_alias

Defined in:
lib/action_controller/mime_type.rb

.register_alias(string, symbol, extension_synonyms = []) ⇒ Object

Registers an alias that’s not used on mime type lookup, but can be referenced directly. Especially useful for rendering different HTML versions depending on the user agent, like an iPhone.



75
76
77
# File 'lib/action_controller/mime_type.rb', line 75

def register_alias(string, symbol, extension_synonyms = [])
  register(string, symbol, [], extension_synonyms, true)
end