has_token 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/has_token.gemspec +2 -2
  3. data/lib/has_token.rb +7 -6
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
data/has_token.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{has_token}
8
- s.version = "0.6.1"
8
+ s.version = "0.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["laserlemon"]
12
- s.date = %q{2009-12-11}
12
+ s.date = %q{2009-12-18}
13
13
  s.description = %q{Generate unique tokens on your ActiveRecord models}
14
14
  s.email = %q{steve@laserlemon.com}
15
15
  s.extra_rdoc_files = [
data/lib/has_token.rb CHANGED
@@ -78,13 +78,14 @@ module HasToken
78
78
  end
79
79
 
80
80
  def set_token(value)
81
- setter = case has_token_options[:callback].to_s
82
- when /(find|initialize|destroy)$/ then nil
83
- when /validation/, /^before/ then :write_attribute
84
- else :update_attribute
81
+ case has_token_options[:callback].to_s
82
+ when /(find|initialize|destroy)$/ then nil
83
+ when /validation/, /^before/
84
+ write_attribute(has_token_options[:column], value)
85
+ else
86
+ write_attribute(has_token_options[:column], value)
87
+ update_without_dirty([has_token_options[:column]])
85
88
  end
86
-
87
- send(setter, has_token_options[:column], value) if setter
88
89
  end
89
90
  end
90
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - laserlemon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-11 00:00:00 -05:00
12
+ date: 2009-12-18 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15