sanitized_attributes 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -12,13 +12,13 @@ module SanitizedAttributes; class SanitizedAttribute
12
12
  def define_ar_writer_method(klass)
13
13
  this = self
14
14
  attr_name = @attr_name
15
- if klass.instance_methods.include?("#{@attr_name}=")
16
- klass.send(:define_method, "#{@attr_name}_with_sanitization=") {|value|
17
- send(:"#{@attr_name}_without_sanitization=", this.sanitize(value))
15
+ if klass.instance_methods.include?("#{attr_name}=")
16
+ klass.send(:define_method, "#{attr_name}_with_sanitization=") {|value|
17
+ send(:"#{attr_name}_without_sanitization=", this.sanitize(value))
18
18
  }
19
- klass.send(:alias_method_chain, :"#{@attr_name}=", :sanitization)
19
+ klass.send(:alias_method_chain, :"#{attr_name}=", :sanitization)
20
20
  else
21
- klass.send(:define_method, "#{@attr_name}=") {|value|
21
+ klass.send(:define_method, "#{attr_name}=") {|value|
22
22
  send(:write_attribute, attr_name, this.sanitize(value))
23
23
  }
24
24
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sanitized_attributes}
8
- s.version = "1.2.1"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Boeh", "CrowdCompass, Inc."]
12
- s.date = %q{2011-05-25}
12
+ s.date = %q{2011-05-27}
13
13
  s.description = %q{A wrapper to make automatic sanitization of incoming data easier. Uses the sanitize gem and works in both plain Ruby and Rails projects.}
14
14
  s.email = %q{matthew.boeh@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanitized_attributes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew Boeh
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-25 00:00:00 -07:00
19
+ date: 2011-05-27 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency