acts-as-joinable 0.1.7.3 → 0.1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/acts_as_joinable/core.rb +2 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
|
|
5
5
|
spec = Gem::Specification.new do |s|
|
6
6
|
s.name = "acts-as-joinable"
|
7
7
|
s.authors = ["Lance Pollard"]
|
8
|
-
s.version = "0.1.7.
|
8
|
+
s.version = "0.1.7.4"
|
9
9
|
s.summary = "ActsAsJoinable: DRYing up Many-to-Many Relationships in ActiveRecord"
|
10
10
|
s.homepage = "http://github.com/viatropos/acts-as-joinable"
|
11
11
|
s.email = "lancejpollard@gmail.com"
|
@@ -212,7 +212,7 @@ module ActsAsJoinable
|
|
212
212
|
|
213
213
|
def action_from_joined(action, model, conditions)
|
214
214
|
join_conditions(model, conditions.delete(:relationship) || {}) do |kind, source_type, relationship_conditions|
|
215
|
-
ids = ActsAsJoinable::Relationship.select_attributes("#{kind}_id", relationship_conditions).uniq
|
215
|
+
ids = ActsAsJoinable::Relationship.select_attributes("#{kind}_id", relationship_conditions).uniq.compact.map(&:to_i)
|
216
216
|
send(action, :conditions => {:id => ids}.merge(conditions))
|
217
217
|
end
|
218
218
|
end
|
@@ -237,7 +237,7 @@ module ActsAsJoinable
|
|
237
237
|
)
|
238
238
|
|
239
239
|
if block_given?
|
240
|
-
yield(kind, source_type, result)
|
240
|
+
yield(opposite_for(kind), source_type, result)
|
241
241
|
else
|
242
242
|
result
|
243
243
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts-as-joinable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 83
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
9
|
- 7
|
10
|
-
-
|
11
|
-
version: 0.1.7.
|
10
|
+
- 4
|
11
|
+
version: 0.1.7.4
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Lance Pollard
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-15 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|