ar_http_wrapper 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,10 @@ module ActiveRecordApiWrapper
|
|
7
7
|
end
|
8
8
|
def api(api_class)
|
9
9
|
klass = self
|
10
|
-
|
10
|
+
resources_name = klass.to_s.underscore.gsub('/','_').pluralize
|
11
11
|
klass_to_param_key = klass.klass_to_param_key
|
12
12
|
|
13
|
-
api_class.resource :"#{
|
13
|
+
api_class.resource :"#{resources_name}" do
|
14
14
|
api_class.desc "Builds a record."
|
15
15
|
api_class.get "/new" do
|
16
16
|
klass.new
|