active_tools 0.0.20 → 0.0.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6d6873920af4b999f5630c94b21949289ee7093
4
- data.tar.gz: b966bcf30a8f34d2c31e100dad6698447da927b7
3
+ metadata.gz: c15c0fa13061e429f8879351705c6cf3b51bb2f4
4
+ data.tar.gz: 51e3d2d2a692f885c4c626cf30351bb0f8b5acfe
5
5
  SHA512:
6
- metadata.gz: 6161ab037dce9d595c1fdf60e2909fe96b17cdd08a28cd7681ec9ee55221a38fcc6cdcc958144f0607d743d61d7baee2908aa6805000ed8fc6bf8a18829cbdca
7
- data.tar.gz: f310b0e4214eb55fb0545c17a1e283f1541104c0af2afe0b4e96cc39f29a12373a9a55ebc18c473406673db75a50cf4f4a13cf8c94bb7a6dc5f86e471234372e
6
+ metadata.gz: 0a9dc2f00894f13170d2cd68324cf9f80348935a0b89c2c4366ddb6e8806db1d206e846bd0f5f8d090f8182f4f33fd4d51ef38501e526a26682ca58379044758
7
+ data.tar.gz: b2698b489ffff32e84731db27e65d7e9fac9e333b8de12aee64e93db7d62ca60e782cd4d56e646765429e815f144b340f00c6e86213acd8c2c81a0706b34aee2
@@ -21,7 +21,7 @@ module ActiveTools
21
21
  else
22
22
  assoc_mapping = value
23
23
  end
24
- reflection = reflections[assoc_name.to_sym]
24
+ reflection = reflections[assoc_name.to_s]
25
25
 
26
26
  unless method_defined? :custom_counter_cache_after_create
27
27
  include ActiveRecord::CustomCounterCache::InstanceMethods
@@ -23,7 +23,7 @@ module ActiveTools
23
23
  end
24
24
  joins_clause =
25
25
  Array.wrap(find_options[:join]).collect do |association|
26
- reflection = resource_class.reflections[association]
26
+ reflection = resource_class.reflections[association.to_s]
27
27
  if reflection.macro == :belongs_to && reflection.options[:polymorphic] != true
28
28
  "INNER JOIN #{reflection.klass.table_name} ON #{reflection.active_record.table_name}.#{reflection.foreign_key} = #{reflection.klass.table_name}.id"
29
29
  elsif reflection.macro.in?([:has_many, :has_one]) && reflection.options[:as].nil?
@@ -1,3 +1,3 @@
1
1
  module ActiveTools
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valery Kvon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails