active_delegate 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_delegate/attributes.rb +2 -3
- data/lib/active_delegate/version.rb +1 -1
- 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: cd11ab2bc38bf3b5315557db8e6587139b949d8d
|
4
|
+
data.tar.gz: 394cbaac82ad1a85f794bdecdfcd1cf3d2b26b49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c319e006da9b6ded2bcbc1510efdf606cb226c790c9b2259c8a9d57dfd9b9d15cb3e118b689841e2f3d6767bab213ebf7eda36ab0bee8125b73f2016de779c3
|
7
|
+
data.tar.gz: 166c56f9f170be0178902cbba74af77011509ad4d03f800632ebf2ae5f7e1762f871d3da4961abbb7391ff83e42f8b0b2b035c565f3e8b8402ad9af1649bb857
|
@@ -136,13 +136,12 @@ module ActiveDelegate
|
|
136
136
|
|
137
137
|
undefined.each do |attrib|
|
138
138
|
attr_name = attrib.to_s.sub("#{attribute_prefix}_", '')
|
139
|
-
attr_deft = @options[:default] || association_class.column_defaults["#{attr_name}"]
|
140
139
|
cast_type = @options[:cast_type] || association_class.attribute_types["#{attr_name}"]
|
141
140
|
|
142
|
-
@model.attribute(attrib, cast_type
|
141
|
+
@model.attribute(attrib, cast_type)
|
143
142
|
|
144
143
|
if @options[:alias].present?
|
145
|
-
@model.attribute(@options[:alias], cast_type
|
144
|
+
@model.attribute(@options[:alias], cast_type)
|
146
145
|
@model.alias_attribute(@options[:alias], attrib)
|
147
146
|
end
|
148
147
|
end
|