app/models/api/base_api.rb in api_versioning-0.0.2 vs app/models/api/base_api.rb in api_versioning-0.0.3
- old
+ new
@@ -1,17 +1,12 @@
class Api::BaseApi
attr_accessor :api_version
- attr_accessor :request
+ attr_accessor :params
API_VERSION_REGEX = /v[0-9]+(_[0-9]+)*/i
-
- def xx
- "xx"
- end
-
- def initialize(version=nil, request=nil)
- self.request = request
+
+ def initialize(version=nil)
set_api_version(version)
end
def render(data)
respond_to?(api_version) ? self.send(api_version, data) : nil
\ No newline at end of file