generic_resources 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generic_resources/acts_as_generic_resource.rb +5 -0
- metadata +17 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d0f12d52df9177b4ea1800324e98622fea31766
|
4
|
+
data.tar.gz: 48c79913f2d4d641777823dfdd1ff5a130cc907c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfedc3610394a423dec8e778b7c78ff0348780d2967e4df8040643ea80c1d295971edd00257a286ea8ae2386beee360d2c58026008c771d3401d1c26afc2dfcc
|
7
|
+
data.tar.gz: ca0f8769a6de19b6d6bc3726d12a092aac1d401cd53f474a3186c5885ba94f183f377d5717aa45d6c59c055ee01bbbda9ee66411b78b73a93b1d9a4d40b21a96
|
@@ -9,6 +9,11 @@ module GenericResources
|
|
9
9
|
|
10
10
|
module ClassMethods
|
11
11
|
def acts_as_generic_resource(permitted_attributes: [], overview_attributes: [])
|
12
|
+
if !self.table_exists?
|
13
|
+
Rails.logger.warn "Try to add generic resource #{self.name} - table does not exist"
|
14
|
+
return false
|
15
|
+
end
|
16
|
+
|
12
17
|
if permitted_attributes.empty?
|
13
18
|
permitted_attributes = (self.try(:column_names) || []) - ['id', 'created_at', 'updated_at']
|
14
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generic_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Eck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,40 +16,46 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.0.4
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: 4.0.4
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: gem_config
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- - "
|
44
|
+
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
46
|
version: '0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: kaminari
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - "
|
58
|
+
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '0'
|
55
61
|
description: Use just one Controller to CRUD all your resources instead of having
|
@@ -71,7 +77,8 @@ files:
|
|
71
77
|
- lib/generic_resources/acts_as_generic_resource.rb
|
72
78
|
- lib/generic_resources/engine.rb
|
73
79
|
homepage: https://github.com/florianeck/generic_resources
|
74
|
-
licenses:
|
80
|
+
licenses:
|
81
|
+
- MIT
|
75
82
|
metadata: {}
|
76
83
|
post_install_message:
|
77
84
|
rdoc_options: []
|
@@ -89,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
96
|
version: '0'
|
90
97
|
requirements: []
|
91
98
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.4.
|
99
|
+
rubygems_version: 2.4.6
|
93
100
|
signing_key:
|
94
101
|
specification_version: 4
|
95
102
|
summary: Easy CRUD Interface for Rails
|