class VersionCake::ResponseStrategy::HttpContentTypeStrategy
Public Instance Methods
execute(context, _status, headers, _response)
click to toggle source
# File lib/versioncake/response_strategy/http_content_type_strategy.rb, line 4 def execute(context, _status, headers, _response) return if headers['Content-Type'].nil? content_type = headers['Content-Type'] content_type << ';' unless headers['Content-Type'].end_with?(';') headers['Content-Type'] = "#{content_type} #{version_key}=#{context.version.to_s}" end