conscious_concern 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/conscious_concern.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b03b02010f58f7d879f3e8c5b74e0874db33918f
|
4
|
+
data.tar.gz: 6505aa8b8080597ecfc20bfda5c7b312fcaf226c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d586bbaa4158b25cf3623daee700d689bad1e67d79c3b4e02703dc9097cb7d0f6e1c8e11e60868d50ad5f3215db539a657d9f7f88e0180d3e62496f9d64a12
|
7
|
+
data.tar.gz: dc69827c2ec8a05ee2d25c7d3696a7f42a13cd72e39bf91f40b80768aac2734382b431a718580bd6117808df6f2bf80ca1eb97fdea7280df5a50cd64b8d472f7
|
data/lib/conscious_concern.rb
CHANGED
@@ -52,23 +52,23 @@ module ConsciousConcern
|
|
52
52
|
alias_method :_models, :models
|
53
53
|
|
54
54
|
def resources(options = { only: [] }, &resource_routing_block)
|
55
|
-
resource_args =
|
55
|
+
resource_args = _route_keys
|
56
56
|
app_routes_block = resource_routing_block.binding.eval('self')
|
57
57
|
app_routes_block.instance_eval do
|
58
58
|
resources(*resource_args, options, &resource_routing_block)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
def route_keys
|
63
|
+
_models.map { |model| model.try(:model_name).try(:route_key) }.compact
|
64
|
+
end
|
65
|
+
alias_method :_route_keys, :route_keys
|
66
|
+
|
62
67
|
def tables
|
63
68
|
_models.map { |model| model.try(:table_name) }.compact
|
64
69
|
end
|
65
70
|
alias_method :_tables, :tables
|
66
71
|
|
67
|
-
def undecorated_table_names
|
68
|
-
_models.map { |model| model.try(:send, :undecorated_table_name) }.compact
|
69
|
-
end
|
70
|
-
alias_method :_undecorated_table_names, :undecorated_table_names
|
71
|
-
|
72
72
|
def let_controllers(method_args_hash)
|
73
73
|
_classes_loaded_callbacks << proc do
|
74
74
|
method_args_hash.each do |method, args|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conscious_concern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janosch Müller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|