File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,16 @@ class Rails < ::Rails::Engine
3535
3636 ::Mime ::Type . register "application/msgpack" , :msgpack
3737
38- ::ActionController ::Renderers . add :msgpack do |data , options |
39- self . content_type = Mime [ :msgpack ]
40- self . response_body = data . is_a? ( String ) ? data : data . to_msgpack ( options )
38+ if ::Rails ::VERSION ::MAJOR > 3 || ::Rails ::VERSION ::MINOR > 0
39+ ::ActionController ::Renderers . add :msgpack do |data , options |
40+ self . content_type = Mime [ :msgpack ]
41+ data . is_a? ( String ) ? data : data . to_msgpack ( options )
42+ end
43+ else
44+ ::ActionController ::Renderers . add :msgpack do |data , options |
45+ self . content_type = Mime [ :msgpack ]
46+ self . response_body = data . is_a? ( String ) ? data : data . to_msgpack ( options )
47+ end
4148 end
4249 end
4350 end
You can’t perform that action at this time.
0 commit comments