Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make headers inheritable

  • Loading branch information...
commit ba83f008bb323adb80b32a2982a3620e400cffc6 1 parent 1eb30b1
@josepjaume josepjaume authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/empresaula-api/resource/base.rb
View
9 lib/empresaula-api/resource/base.rb
@@ -4,6 +4,15 @@ module Empresaula
module API
module Resource
class Base < ActiveResource::Base
+ class << self
+ def headers
+ @headers ||= {}
+ if superclass.respond_to?(:headers)
+ @headers.merge!(superclass.headers)
+ end
+ @headers
+ end
+ end
self.format = :json
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.