has-relationship 0.0.7 → 0.0.8

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -31,12 +31,6 @@ module HasRelationship
31
31
  relationships = relationship.kind_of?(Array) ? relationship : [relationship]
32
32
 
33
33
  relationship_through = options[:singular] ? "relationship_through_#{relationships.join("_").to_s.tableize.singularize}".to_sym : "relationship_through_#{relationships.join("_").to_s.tableize}".to_sym
34
-
35
- HasRelationship::Relationship.class_eval do
36
- before_validation do
37
- self.relation2 = self.send("relation2_#{class_name.downcase}") unless self.relation2.present? or self.send("relation2_#{class_name.downcase}").nil?
38
- end
39
- end
40
34
 
41
35
  class_eval do
42
36
  through_conditions = (relationship.kind_of?(Array) ? nil : {:relationship => relationship})
@@ -88,12 +82,6 @@ module HasRelationship
88
82
  relationships = relationship.kind_of?(Array) ? relationship : [relationship]
89
83
 
90
84
  relationship_through = options[:singular] ? "inverse_relationship_through_#{relationships.join("_").to_s.tableize.singularize}".to_sym : "inverse_relationship_through_#{relationships.join("_").to_s.tableize}".to_sym
91
-
92
- HasRelationship::Relationship.class_eval do
93
- before_validation do
94
- self.relation1 = self.send("relation1_#{class_name.downcase}") unless self.relation1.present? or self.send("relation1_#{class_name.downcase}").nil?
95
- end
96
- end
97
85
 
98
86
  class_eval do
99
87
  through_conditions = (relationship.kind_of?(Array) ? nil : {:relationship => relationship})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has-relationship
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Hunter
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-28 00:00:00 -04:00
18
+ date: 2011-04-29 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21