rack-autocrud 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/autocrud.rb +1 -1
- metadata +3 -3
data/lib/rack/autocrud.rb
CHANGED
@@ -145,7 +145,7 @@ module Rack
|
|
145
145
|
|
146
146
|
# Attempt to update the model
|
147
147
|
begin
|
148
|
-
saved = model.update(JSON.parse(request.body.read)
|
148
|
+
saved = model.get(params[:id]).update(JSON.parse(request.body.read))
|
149
149
|
halt [ 402, '{ "error": "Access Denied" }' ] unless saved
|
150
150
|
rescue JSON::ParserError
|
151
151
|
halt [ 400, { 'error' => 'Invalid JSON in request body.', 'details' => $! }.to_json ]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-autocrud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 1.8.
|
96
|
+
rubygems_version: 1.8.23
|
97
97
|
signing_key:
|
98
98
|
specification_version: 3
|
99
99
|
summary: Rack middleware that automagically handles basic CRUD operations
|