ar_http_wrapper 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ module ActiveRecordApiWrapper
|
|
7
7
|
end
|
8
8
|
def api(api_class)
|
9
9
|
klass = self
|
10
|
-
resources_name = klass.to_s.underscore.
|
10
|
+
resources_name = klass.to_s.underscore.pluralize
|
11
11
|
klass_to_param_key = klass.klass_to_param_key
|
12
12
|
|
13
13
|
api_class.resource :"#{resources_name}" do
|
@@ -3,7 +3,7 @@ shared_examples "ActiveRecordApiWrapper" do |klass,mountpoint,api_version|
|
|
3
3
|
let(:mountpoint) {mountpoint}
|
4
4
|
let(:api_version) {api_version}
|
5
5
|
def subject_name
|
6
|
-
subject.to_s.underscore.
|
6
|
+
subject.to_s.underscore.pluralize
|
7
7
|
end
|
8
8
|
def api_version_path
|
9
9
|
api_version ? api_version+'/' : ''
|