delegate_associations 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/delegate_associations.gemspec +1 -1
- data/lib/delegate_associations.rb +10 -4
- 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: b2e224ffc9bad2b9f1163119098d92148e3d1294
|
4
|
+
data.tar.gz: a52e4dc1f43192d06cbad525825686df200aab81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b32909d78651f7bafe13e4fe9aa893ed7e4743c6b4f3fe86e66fd0e09a4d4876b7b24ab58a159e7ab059be389988423c529503b6e879cdf8d3c575d94b7b1440
|
7
|
+
data.tar.gz: 8ac939ccfd9ed790b3e102c055fc94ab0c900fa6406dafb9762a9337a939d01328ca239e88cf1a0c20ccbf2557c4cb7266ba65876ef15732ae7d30362c32717c
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "delegate_associations"
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.4"
|
4
4
|
s.description = "A gem for delegate attributes and associations of belongs_to and has_one"
|
5
5
|
s.summary = "A gem for delegate attributes and associations of belongs_to and has_one"
|
6
6
|
s.homepage = "https://github.com/Brunomm/delegate_associations"
|
@@ -49,12 +49,18 @@ module DelegateAssociations
|
|
49
49
|
only = [options[:only]].flatten.compact.map!(&:to_sym)
|
50
50
|
except += delegate_exclude_columns
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
# I need "begin" because have a problem with Devise when I run migrations
|
53
|
+
# Devise call User classs before run all migrations
|
54
|
+
begin
|
55
|
+
associations.each do |association|
|
56
|
+
get_deletage_methods(reflect_on_association(association).klass.column_names, except, only).each do |attribute|
|
57
|
+
options[:suffix].each do |sf|
|
58
|
+
delegate "#{attribute}#{sf}", to: association, allow_nil: options[:allow_nil]
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
62
|
+
rescue
|
63
|
+
true
|
58
64
|
end
|
59
65
|
end
|
60
66
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delegate_associations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Mucelini Mergen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A gem for delegate attributes and associations of belongs_to and has_one
|
14
14
|
email:
|