active_record_attributes_stripper 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baf5575b04be04cc6bebea78e08e3382d4f70ddf
4
- data.tar.gz: 052af74535678f97474461e5635df154ad2e1037
3
+ metadata.gz: c70bfe28dad4a6f35c6a647a941d5f6cc446dc7d
4
+ data.tar.gz: 9d600b6fbc18f5b51dd457f2024e99e6cf4df2db
5
5
  SHA512:
6
- metadata.gz: 805edf3d46237da9d7c92f1eae9baeb518389de1cfec2a8d700d959a037dc3b7e850f8ad7fc953f4f3113cc696fa0508bb2f8b47462399a7241a2b651e146725
7
- data.tar.gz: ae62c40f94e0477183b395f18c5801bf7135516d7852f26e757d2bc53abf22f17a840cef522b353d770f695c6b1ebe55429cdf11acaac5f8280f4fbe798c34d9
6
+ metadata.gz: bcc13bd5d33f7f201dbfc7eb1d24ced1ac64933ebcbcfd8b5559f0639083a0675e9952d90f83a28c0e8f2fea1daf1988cecad2830cd7d07a2a85ad9f00451ccb
7
+ data.tar.gz: cbb8de683f301d8349542656798de85d29aaaeb7cdda3ad9c32e05dc8f2c43f61af1359eb5f06f2e980dca5a40d34ebb8a0df0be3fea806808be13c0479b3010
data/README.md CHANGED
@@ -6,14 +6,20 @@ Automatically strip all string attributes in model before validation.
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'active_record_attributes_stripper'
9
+ gem 'active_record_attributes_stripper'
10
10
 
11
11
  And then execute:
12
12
 
13
- $ bundle
13
+ $ bundle
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install active_record_attributes_stripper
17
+ $ gem install active_record_attributes_stripper
18
18
 
19
- Copyright (c) 2013 [Damian Baćkowski], released under the MIT license
19
+ ## Contributing
20
+
21
+ 1. Fork it
22
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
23
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
24
+ 4. Push to the branch (`git push origin my-new-feature`)
25
+ 5. Create a new Pull Request
@@ -2,7 +2,7 @@
2
2
  require File.expand_path('../lib/active_record_attributes_stripper/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Damian Ba\304\207kowski"]
5
+ gem.authors = ["Damian Baćkowski"]
6
6
  gem.email = ["damianbackowski@gmail.com"]
7
7
  gem.description = %q{Active Record attributes stripper}
8
8
  gem.summary = %q{Automatically strip all string attributes in model before validation.}
@@ -3,7 +3,7 @@ require "active_record_attributes_stripper/version"
3
3
  module ActiveRecordAttributesStripper
4
4
  protected
5
5
  def strip_attributes
6
- @attributes.each do |attr, value|
6
+ @attributes.to_hash.each do |attr, value|
7
7
  self[attr] = value.strip if value.present? && value.respond_to?(:strip)
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordAttributesStripper
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_attributes_stripper
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Baćkowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-04 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Active Record attributes stripper
14
14
  email:
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubyforge_project:
48
- rubygems_version: 2.0.3
48
+ rubygems_version: 2.0.14
49
49
  signing_key:
50
50
  specification_version: 4
51
51
  summary: Automatically strip all string attributes in model before validation.