acts_as_having_string_id 0.2.1 → 0.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0af1a565f4bd65e2d7c60cea9c272904e1bade7
|
|
4
|
+
data.tar.gz: 15fa151842983d01af209267b848c6a3d1daa785
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9dbfb50194f8162e8e81919b1541ea1ece6e553e873c1bfb37600a514d819ea8757ec7d72f8cef30e2beb1e3a8abf80a2b9047a5b8df60fa4c83d711bf27d7c
|
|
7
|
+
data.tar.gz: 69baadb1387223e3ce034d25e8652daa237188d26c2f1311a0504e2a10df21550547575660c87cc1a574123f1b8d6d085c360e0227f5b68fa45c33fb1e42fb38
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module ActsAsHavingStringId
|
|
2
2
|
class Railtie < Rails::Railtie
|
|
3
3
|
config.to_prepare do
|
|
4
|
-
unless
|
|
5
|
-
|
|
4
|
+
unless ActiveRecord::Base.included_modules.include?(ActsAsHavingStringId)
|
|
5
|
+
ActiveRecord::Base.include(ActsAsHavingStringId)
|
|
6
6
|
end
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -14,8 +14,10 @@ module ActsAsHavingStringId
|
|
|
14
14
|
|
|
15
15
|
self.reflections.each_value do |r|
|
|
16
16
|
# Attribute all foreign keys pointing here as well
|
|
17
|
-
r.
|
|
18
|
-
|
|
17
|
+
unless r.is_a? ActiveRecord::Reflection::ThroughReflection
|
|
18
|
+
r.klass.class_eval do
|
|
19
|
+
attribute r.foreign_key.to_sym, attrib_type
|
|
20
|
+
end
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_as_having_string_id
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Magnus Hult
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|