acts-as-joinable 0.1.6.1 → 0.1.6.2
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/active_record_patch.rb +1 -0
- data/lib/acts_as_joinable/core.rb +5 -0
- data/test/lib/group.rb +1 -0
- data/test/lib/role.rb +3 -0
- data/test/lib/user.rb +3 -0
- data/test/test_acts_as_joinable.rb +8 -0
- metadata +6 -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.6.
|
8
|
+
s.version = "0.1.6.2"
|
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"
|
@@ -179,6 +179,11 @@ module ActsAsJoinable
|
|
179
179
|
end
|
180
180
|
define_method "#{singular_type}=" do |value|
|
181
181
|
#send(relationship_with_context).delete_all
|
182
|
+
|
183
|
+
#send(relationship_with_context).delete_all
|
184
|
+
#send(plural_type).each do |object|
|
185
|
+
# send(plural_type).delete(object)
|
186
|
+
#end
|
182
187
|
unless value.blank?
|
183
188
|
send(plural_type) << value
|
184
189
|
end
|
data/test/lib/group.rb
CHANGED
data/test/lib/role.rb
ADDED
data/test/lib/user.rb
ADDED
@@ -86,6 +86,14 @@ class ActsAsJoinableTest < ActiveRecord::TestCase
|
|
86
86
|
assert_equal 0, ActsAsJoinable::Relationship.count
|
87
87
|
end
|
88
88
|
|
89
|
+
context "follow validation conventions" do
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
context "find by join model" do
|
94
|
+
|
95
|
+
end
|
96
|
+
|
89
97
|
teardown do
|
90
98
|
destroy_models
|
91
99
|
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: 91
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
9
|
- 6
|
10
|
-
-
|
11
|
-
version: 0.1.6.
|
10
|
+
- 2
|
11
|
+
version: 0.1.6.2
|
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-
|
19
|
+
date: 2010-10-04 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|
@@ -42,8 +42,10 @@ files:
|
|
42
42
|
- test/lib/group.rb
|
43
43
|
- test/lib/page.rb
|
44
44
|
- test/lib/post.rb
|
45
|
+
- test/lib/role.rb
|
45
46
|
- test/lib/sub_group.rb
|
46
47
|
- test/lib/tag.rb
|
48
|
+
- test/lib/user.rb
|
47
49
|
- test/test_acts_as_joinable.rb
|
48
50
|
- test/test_helper.rb
|
49
51
|
- app/models/relationship.rb
|