Module: Relevance::CoreExtensions::Response
- Defined in:
- lib/relevance/core_extensions/response.rb
Instance Method Summary collapse
Instance Method Details
#html? ⇒ Boolean
5 6 7 8 9 10 11 |
# File 'lib/relevance/core_extensions/response.rb', line 5 def html? # some versions of Rails integration tests don't set content type # so we are treating nil as html. A better fix would be welcome here. (content_type.respond_to?(:html?) ? content_type.html? : content_type =~ %r{^text/html}) || content_type.nil? end |