auto_strip_attributes 1.0.1 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,8 +10,8 @@ module AutoStripAttributes
|
|
10
10
|
|
11
11
|
attributes.each do |attribute|
|
12
12
|
before_validation do |record|
|
13
|
-
value = record.send(attribute)
|
14
|
-
|
13
|
+
#value = record.send(attribute)
|
14
|
+
value = record[attribute]
|
15
15
|
if value.respond_to?(:strip)
|
16
16
|
value_stripped = (options[:nullify] && value.blank?) ? nil : value.strip
|
17
17
|
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_strip_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
- 0
|
9
8
|
- 1
|
10
|
-
version: 1.
|
9
|
+
version: "1.1"
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Olli Huotari
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2011-
|
17
|
+
date: 2011-10-07 00:00:00 Z
|
19
18
|
dependencies:
|
20
19
|
- !ruby/object:Gem::Dependency
|
21
20
|
name: activerecord
|