trim_spaces_for 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -25,7 +25,7 @@ That corresponds to the full-width space.
25
25
  > obj = User.new
26
26
  > obj.age = " 23" # full-width space
27
27
  > obj.save #=> true
28
- > obj.age = "23"
28
+ > obj.age #=> 23
29
29
 
30
30
 
31
31
  This project rocks and uses MIT-LICENSE.
@@ -10,7 +10,7 @@ module TrimSpacesFor
10
10
  target_attributes.each do |attribute|
11
11
  before_cast = model.__send__("#{attribute}_before_type_cast")
12
12
  if before_cast.respond_to?(:trim_white_spaces)
13
- model[attribute] = before_cast.trim_white_spaces
13
+ model.__send__("#{attribute}=", before_cast.trim_white_spaces)
14
14
  end
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module TrimSpacesFor
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: trim_spaces_for
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Takumi Miura
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-02-21 00:00:00 +09:00
13
+ date: 2012-03-03 00:00:00 +09:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- hash: -141074561226819087
161
+ hash: -2882285237797838877
162
162
  segments:
163
163
  - 0
164
164
  version: "0"
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
- hash: -141074561226819087
170
+ hash: -2882285237797838877
171
171
  segments:
172
172
  - 0
173
173
  version: "0"