glass-api 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/app/assets/javascripts/glass.js +2 -2
- data/app/controllers/glass/api_controller.rb +1 -1
- data/config/routes.rb +1 -1
- data/lib/glass/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTMzMzUwNzUzMzhjMmY3MTZhODEwNzNiNWU5OGU5NzBlOGRhM2RlMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGYzODQ1MDhkYzY1MzRmZWM1MTg1MDRjYTEwNDU0NGEyN2E2MTJhYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDljZjNiZTEwZDkyM2MzYmRmYmE3ODI4ZDljMDBhZWRhNzNiZmNhZTQ3MGVi
|
10
|
+
OTJlM2NiY2MzZWZhNThiN2YxZWIxMDlkMDU1YzcyMGRhYWIzNDllMmY0N2Q2
|
11
|
+
YzgyYjZhMDBjOGMwM2YxNGFkZjA3NzIyNzY5ZWE5NGM1NjJjMjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzQ3ODg1NGFlNDhlMzVlZGRhOWFmNWI1YWZjNzgzZTM0MGU0YjdiYmZlNzBm
|
14
|
+
MTZmNzY0Y2RmODM4ZGYwZDllN2NkOWE4MzgxYzY1NDgxMGM3YzU4OTA1N2Zh
|
15
|
+
NTRlYWViOWRmZWU5ZmY4ZTA1N2QxNmQ1M2JjNWNhYzc2ZGI0OTA=
|
data/README.md
CHANGED
@@ -139,7 +139,7 @@ glass.User.update(user, function (res, error) {
|
|
139
139
|
Delete a user record with `id == 1`.
|
140
140
|
|
141
141
|
```javascript
|
142
|
-
glass.User.delete(1, function (res, error) {
|
142
|
+
glass.User.delete({id: 1}, function (res, error) {
|
143
143
|
if (!error) {
|
144
144
|
// Do something with res
|
145
145
|
}
|
@@ -212,7 +212,7 @@
|
|
212
212
|
});
|
213
213
|
};
|
214
214
|
|
215
|
-
Model.prototype.
|
215
|
+
Model.prototype.destroy = function(options, callback) {
|
216
216
|
if (typeof options == 'function' || options === undefined) throw new Error("Model#delete() is missing 'options' parameter.");
|
217
217
|
|
218
218
|
if (options.hasOwnProperty('id')) {
|
@@ -221,7 +221,7 @@
|
|
221
221
|
delete options.id;
|
222
222
|
}
|
223
223
|
else {
|
224
|
-
throw new Error("Model#
|
224
|
+
throw new Error("Model#destroy() is missing 'options.id' parameter.");
|
225
225
|
}
|
226
226
|
|
227
227
|
var queryParams = this.serialize(options),
|
data/config/routes.rb
CHANGED
@@ -7,6 +7,6 @@ Glass::Engine.routes.draw do
|
|
7
7
|
get '/:model_scope/:id', to: :show, as: 'show', via: 'get'
|
8
8
|
post '/:model_scope', to: :create, as: 'create', via: 'post'
|
9
9
|
put '/:model_scope/:id', to: :update, as: 'update', via: 'put'
|
10
|
-
delete '/:model_scope/:id', to: :
|
10
|
+
delete '/:model_scope/:id', to: :destroy, as: 'destroy', via: 'delete'
|
11
11
|
end
|
12
12
|
end
|
data/lib/glass/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glass-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Peterson Co, Jaune Sarmiento, Robbie Marcelo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|