active_model-attribute 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_model/attribute.rb +1 -3
- 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: d95747a10423b764cf2bf709a6fd40ac575da3cf
|
4
|
+
data.tar.gz: 4f58b52e8e850770d93bbb6792394e0d488c45f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 704fc0632f75dbf3c28c93ab0580e2b2e3f16bb8da6cfdba0d0171ec889b22865e72a78878cb214e89ce90f38768b2b984d03812f071075d416fd58aae7b63f7
|
7
|
+
data.tar.gz: b0d7700ceb94fb6ba6ba6cb0e81b23f3ea92032e80dfc693d3b3475b5cc97c3f0ac7b6fda2e3c0b2bc4302c7c7364ba9cc4fec8ed96851c60465bda5931fcc7b
|
@@ -23,9 +23,7 @@ module ActiveModel
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def attribute(name, type, **options)
|
26
|
-
|
27
|
-
|
28
|
-
attributes << name unless options.delete(:virtual)
|
26
|
+
attributes << name unless attributes.include?(name)
|
29
27
|
|
30
28
|
getter = name.to_sym
|
31
29
|
setter = :"#{name}="
|