resources 1.0.0 → 1.0.1
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 +4 -4
- data/lib/resources/manager.rb +2 -2
- data/lib/resources/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +3 -0
- metadata +2 -4
- data/test/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5ed704f005664652620db58a65009f2ef5a1260
|
|
4
|
+
data.tar.gz: c335d159bf4bacdaa0389dff7df154ba38a4c85d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae6977fbe1caf2b3444f66699c682998fd311017c09a7d41c7e4d72a1b453365b026b2712e73f4823a1203b84dcda881fb2bf48e46c51a661ed4102d0ae50d9d
|
|
7
|
+
data.tar.gz: 52aa1ce83e25d996a3723ce34a64b9b28ccfe95218d69bf214d021684a951ebc1eb078028ce99582ae9d425e88bf31b16261bd5478255c225527e9642740df3f
|
data/lib/resources/manager.rb
CHANGED
|
@@ -48,14 +48,14 @@ module Resources
|
|
|
48
48
|
|
|
49
49
|
def resource
|
|
50
50
|
if grape?
|
|
51
|
-
@resource ||= params[:id].blank? ? build_resource : (resource_scope.
|
|
51
|
+
@resource ||= params[:id].blank? ? build_resource : (resource_scope.find(params[:id]) rescue nil )
|
|
52
52
|
else
|
|
53
53
|
@resource ||=
|
|
54
54
|
case controller.action_name
|
|
55
55
|
when "new", "create"
|
|
56
56
|
build_resource
|
|
57
57
|
else
|
|
58
|
-
resource_scope.
|
|
58
|
+
resource_scope.find(params[:id]) rescue nil
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
data/lib/resources/version.rb
CHANGED
|
Binary file
|
|
@@ -3989,3 +3989,6 @@ Processing by CountriesController#index as HTML
|
|
|
3989
3989
|
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "countries"
|
|
3990
3990
|
Rendered countries/index.html.haml within layouts/application (3.5ms)
|
|
3991
3991
|
Completed 200 OK in 11ms (Views: 11.2ms | ActiveRecord: 0.2ms)
|
|
3992
|
+
[1m[36m (17.2ms)[0m [1mDELETE FROM "countries";[0m
|
|
3993
|
+
[1m[35m (0.1ms)[0m SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
|
|
3994
|
+
[1m[36m (17.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'countries';[0m
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emilio Forrer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -238,7 +238,6 @@ files:
|
|
|
238
238
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/tCM0KKnd2WiAjdWEr6LbNvF0qyf45275nyBUJwpmeMQ.cache
|
|
239
239
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/uVhuknH4mKck5LFVwZj9pmuaR7SE-0M45V52MkrBJPk.cache
|
|
240
240
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/xa5H-1005wsDczOFgyc7KdSbQzU5n8neJtBcQS74ncg.cache
|
|
241
|
-
- test/dummy/tmp/pids/server.pid
|
|
242
241
|
- test/resources_test.rb
|
|
243
242
|
- test/test_helper.rb
|
|
244
243
|
homepage: https://github.com/emilioforrer/resources
|
|
@@ -297,7 +296,6 @@ test_files:
|
|
|
297
296
|
- test/dummy/config/environments/production.rb
|
|
298
297
|
- test/dummy/config/database.yml
|
|
299
298
|
- test/dummy/config/routes.rb
|
|
300
|
-
- test/dummy/tmp/pids/server.pid
|
|
301
299
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/41pS6qeEZuOGdyzk3yCjRfBsaXZAyI-DvH5kzsEcVdo.cache
|
|
302
300
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/7ZK4CBk3GcsUKFsZNRJfseBsCcQIIJUzVEPZiEGcdJ4.cache
|
|
303
301
|
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/G3sodj-ssqsbEWYKt4p0hE18yArx4HB1LUI3JWIY15Y.cache
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5189
|