app/controllers/uploader/attachments_controller.rb in rails-uploader-0.2.4 vs app/controllers/uploader/attachments_controller.rb in rails-uploader-0.2.5

- old
+ new

@@ -45,13 +45,11 @@ render_json(record.errors, 422) end end def render_json(hash_or_object, status = 200) - ctype = env["HTTP_USER_AGENT"] && env["HTTP_USER_AGENT"].include?("Android") ? "text/plain" : "application/json" - self.status = status - self.content_type = ctype + self.content_type = Uploader.content_type(env["HTTP_USER_AGENT"]) self.response_body = hash_or_object.to_json(:root => false) end end end