Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Merge pull request #6376 from Miciah/bug-1322543-controller-default-t…
Browse files Browse the repository at this point in the history
…o-json

Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Apr 5, 2016
2 parents 0324ee4 + 2fee966 commit 73197c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controller/lib/openshift/controller/api_behavior.rb
Expand Up @@ -8,11 +8,16 @@ module ApiBehavior

included do
before_filter ->{ Mongoid.identity_map_enabled = true }
before_filter :default_format_json
end

protected
attr :requested_api_version

def default_format_json
request.format ||= 'json'
end

def check_version
version = catch(:version) do
"#{request.accept},#{request.env['CONTENT_TYPE']}".split(',').each do |mime_type|
Expand Down

0 comments on commit 73197c2

Please sign in to comment.