one_touch 2.1.1 → 2.1.2
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 +4 -4
- data/lib/one_touch/models/active_record_extension.rb +2 -2
- data/lib/one_touch/version.rb +1 -1
- data/readme.md +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32c8c028728efdec14df4d99b0695a448f003340
|
4
|
+
data.tar.gz: b15271d797e355e29e6071a022d42817a307e008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8600fd34c5d5e18b0f962acf0e8051226a99cf6e50616af4ecd84e8bbed0853b2462e3ce9c971107f9fa337b0a4b2c8dbd54770edf2fb69ad41a20eca2158e30
|
7
|
+
data.tar.gz: 2d0d772022b744babfab44b07045938dc97764ee3e0205e95ecd7903469d0b626356cc37d12521e9014aac1f762c5996a55042139d48ff6e18109c53d941d804
|
@@ -68,7 +68,7 @@ module OneTouch
|
|
68
68
|
if opt[:polymorphic] == true
|
69
69
|
has_many :favors, :class_name => opt[:bridge_klass], :as => :host
|
70
70
|
else
|
71
|
-
has_many :favors, :class_name => opt[:bridge_klass]
|
71
|
+
has_many :favors, :class_name => opt[:bridge_klass], :foreign_key => :host_id
|
72
72
|
end
|
73
73
|
end
|
74
74
|
include AsFavorHost
|
@@ -83,7 +83,7 @@ module OneTouch
|
|
83
83
|
if opt[:polymorphic] == true
|
84
84
|
has_many :be_favors, :class_name => opt[:bridge_klass], :as => :favorable
|
85
85
|
else
|
86
|
-
has_many :be_favors, :class_name => opt[:bridge_klass]
|
86
|
+
has_many :be_favors, :class_name => opt[:bridge_klass] # we need add option of foreign key
|
87
87
|
end
|
88
88
|
end
|
89
89
|
include AsFavorable
|
data/lib/one_touch/version.rb
CHANGED
data/readme.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
### Upgrade warnning
|
2
|
+
In version > 2.1.1 , as_favor_host can accept option polymorphic, it default as false, so if your Favor model belongs_to host as a polymorphic relation, add as_favor_host polymorphic: true. I will update readme to include it later.
|
3
|
+
|
2
4
|
The loading sequence bug in 2.0.0 was fixed in 2.1.0. Please upgrade to 2.1.0 or stay on ~> 1
|
3
5
|
|
4
6
|
### Intro
|