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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/conscious_concern.rb +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38311a8767fe5fb909bcb0df55685ac8537b2039
4
- data.tar.gz: 52248dc0fe825eafaf20cb14cbaaaf6e675d9979
3
+ metadata.gz: b03b02010f58f7d879f3e8c5b74e0874db33918f
4
+ data.tar.gz: 6505aa8b8080597ecfc20bfda5c7b312fcaf226c
5
5
  SHA512:
6
- metadata.gz: 45059c9c9e8e72666f8a428268d691819ea833c2a0e4317fcb0c1db8b8b376340e616d5ca1d661c3d9d3c71b6cc9b57539d21cb56238a2e29ab5bdee698bc672
7
- data.tar.gz: b44c47bcd9af6a5c136c6d93e90261e33dfc773b39609c882a9b40769c30bbccc2287edcec76dd776c69c3f9f90e77e1136d6e0f0e4bdaf54981a0eb1f75d3c1
6
+ metadata.gz: 97d586bbaa4158b25cf3623daee700d689bad1e67d79c3b4e02703dc9097cb7d0f6e1c8e11e60868d50ad5f3215db539a657d9f7f88e0180d3e62496f9d64a12
7
+ data.tar.gz: dc69827c2ec8a05ee2d25c7d3696a7f42a13cd72e39bf91f40b80768aac2734382b431a718580bd6117808df6f2bf80ca1eb97fdea7280df5a50cd64b8d472f7
@@ -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 = _undecorated_table_names
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.3
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-17 00:00:00.000000000 Z
11
+ date: 2015-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport