activerecord-traits 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/traits/association/join.rb +1 -1
- data/lib/traits/attribute/key.rb +1 -1
- data/lib/traits/attribute/querying.rb +1 -1
- data/lib/traits/model.rb +1 -1
- data/lib/traits/railtie.rb +1 -1
- data/lib/traits/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a036911309ec08f65047cc51cef3c7599baab8d
|
4
|
+
data.tar.gz: da39b9604d3169ee2ab658c9187a8eb31d94ee84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3197336a5215c5ef877158f34895b0cb151abf8c4c201e47cd1fe56217a830eea0720e25dd0d7bb2e80787a68081c1257b2704cef58ffb809ecdef38d06ec5f2
|
7
|
+
data.tar.gz: a45aacb9e2721a52efef6d7dc77ee4092c93aac881a0f07645ba1ba03e7b425567212cad3d70b4774b7b5e529aaaac1ee693fd8dd13e5c2237e16f6acfb1ad51
|
data/lib/traits/attribute/key.rb
CHANGED
@@ -12,7 +12,7 @@ module Traits
|
|
12
12
|
|
13
13
|
def foreign_key?
|
14
14
|
attr_name = name
|
15
|
-
attr_translates = model_class.attribute_features[attr_name].translates_with_globalize?
|
15
|
+
attr_translates = model_class.attribute_features[attr_name].try(:translates_with_globalize?)
|
16
16
|
|
17
17
|
model.associations.any? do |assoc|
|
18
18
|
if assoc.belongs_to?
|
data/lib/traits/model.rb
CHANGED
@@ -62,7 +62,7 @@ module Traits
|
|
62
62
|
else
|
63
63
|
columns = model_class.columns_hash.values
|
64
64
|
|
65
|
-
if features.translates_with_globalize?
|
65
|
+
if features.try(:translates_with_globalize?)
|
66
66
|
globalize = features.globalize
|
67
67
|
tr_class = globalize.model_class_for_translations
|
68
68
|
tr_columns_hash = tr_class.columns_hash
|
data/lib/traits/railtie.rb
CHANGED
data/lib/traits/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-traits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yaroslav Konoplov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|