laserlemon-has_token 0.3.1 → 0.3.2

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/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('has_token', '0.3.1') do |g|
5
+ Echoe.new('has_token', '0.3.2') do |g|
6
6
  g.description = %(Generate unique tokens on your ActiveRecord models)
7
7
  g.url = 'http://github.com/laserlemon/has_token'
8
8
  g.author = 'Steve Richert'
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 1
4
+ :patch: 2
@@ -6,7 +6,7 @@ class CreateTokens < ActiveRecord::Migration
6
6
  end
7
7
 
8
8
  change_table :tokens do |t|
9
- t.index [:parent_id, :parent_type], :unique => true
9
+ t.index [:parent_id, :parent_type]
10
10
  t.index :value, :unique => true
11
11
  end
12
12
  end
data/has_token.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{has_token}
5
- s.version = "0.3.1"
5
+ s.version = "0.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Steve Richert"]
data/lib/has_token.rb CHANGED
@@ -25,7 +25,7 @@ module LaserLemon
25
25
  attr_readonly(options[:column]) if options[:readonly]
26
26
  define_method(:to_param){ read_attribute(options[:column]) } if options[:to_param]
27
27
 
28
- has_one :global_token, :class_name => 'Token', :as => :parent, :autosave => true
28
+ has_one :global_token, :class_name => 'Token', :as => :parent, :autosave => true, :dependent => :nullify
29
29
 
30
30
  include InstanceMethods
31
31
  before_create :set_token
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: laserlemon-has_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Richert