passive_record 0.4.13 → 0.4.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d211fdab7ab67cfa36f0eb20919b98f334b1f52a
4
- data.tar.gz: 3b222ff303400e4b17b8bb776fd621c0d4b06ffa
3
+ metadata.gz: cacd9ce096b75a0cb189db566c1b506263462bcd
4
+ data.tar.gz: 6d05d9c4520b4f8a7365ff587ee72e49fcb93f37
5
5
  SHA512:
6
- metadata.gz: 127ac6578c9583d0a9d24819818c92a9b01fab3b7c9a00507d3c422bede8055135c62aff00c81155281f5276aca747d787a8819646f0a3d8206a2dbb006ef974
7
- data.tar.gz: a6ceaf8115ed8e8dd11c1cc1333eef38f5f66cb0a9f1d3a86988758b60f9b6de6dde2b819ed925f97316b57bef15c41fd3b1638af5316af7188b318c04c35380
6
+ metadata.gz: 56634dcfa1edfa95df038ace1d9ea482b95a3d4766961dd802955cbd35f37311a3b97d2d97f93fc255fdafd248ce7dbae7fa867de964f4a6f2dfa950fd24331f
7
+ data.tar.gz: 7aa8cec6e8442a4e9c7eb7a2cf1a72acd686028577b9604ef9ee373977a7deda2d8c3673fb6a9303eaaea713f0eae3289d18f06761afabd34d6cdbaf5bea6ba2
@@ -90,7 +90,6 @@ module PassiveRecord
90
90
  through_class_collection_name = opts.delete(:through)
91
91
 
92
92
  through_class_name = (through_class_collection_name.to_s).split('_').map(&:capitalize).join.singularize
93
- # binding.pry if through_class_collection_name == :blogs
94
93
  base_association = associations.detect { |assn| assn.child_class_name == through_class_name rescue false }
95
94
 
96
95
  association = HasManyThroughAssociation.new(
@@ -31,7 +31,6 @@ module PassiveRecord
31
31
  )
32
32
  end
33
33
  else
34
- # binding.pry
35
34
  intermediary_model = intermediary_relation.
36
35
  where(
37
36
  association.target_name_symbol.to_s.singularize + "_id" => child.id).
@@ -80,7 +79,6 @@ module PassiveRecord
80
79
  end
81
80
 
82
81
  def intermediary_relation
83
- # binding.pry
84
82
  @intermediary_relation ||= association.base_association.to_relation(parent_model)
85
83
  end
86
84
 
@@ -133,13 +131,10 @@ module PassiveRecord
133
131
 
134
132
  until !n.is_a?(HasManyThroughAssociation)
135
133
  key = n.through_class.to_s.singularize.to_sym
136
- p [ :n_class, n.class, key ]
137
134
  hash = {key => hash}
138
135
  n = n.nested_association
139
136
  end
140
137
 
141
- # binding.pry
142
-
143
138
  hash
144
139
  else
145
140
  nested_conds
@@ -149,7 +144,6 @@ module PassiveRecord
149
144
 
150
145
  def where(conditions={})
151
146
  merged_conditions = conditions.merge(intermediary_conditions)
152
- # binding.pry
153
147
  child_class.where(merged_conditions)
154
148
  end
155
149
  end
@@ -1,4 +1,4 @@
1
1
  module PassiveRecord
2
2
  # passive_record version
3
- VERSION = "0.4.13"
3
+ VERSION = "0.4.14"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passive_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Weissman