database_validation 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,6 @@ module DatabaseValidation
6
6
 
7
7
  private
8
8
 
9
- VERSION = [0, 0, 5]
9
+ VERSION = [0, 0, 6]
10
10
 
11
11
  end
@@ -35,7 +35,7 @@ module DatabaseValidation
35
35
  end
36
36
  ActiveRecord::Base.connection.indexes(base.table_name).each do |key|
37
37
  col_syms = key.columns.map(&:to_sym)
38
- base.send(:validates_uniqueness_of, col_syms.first.to_sym, :scope => col_syms.slice(1, -1)) if key.unique
38
+ base.send(:validates_uniqueness_of, col_syms.first.to_sym, :scope => col_syms[1..-1]) if key.unique
39
39
  end
40
40
  end
41
41
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_validation
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 19
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 5
9
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
10
11
  platform: ruby
11
12
  authors:
12
13
  - John Crepezzi
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-01-27 00:00:00 -05:00
18
+ date: 2011-04-07 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 3
28
30
  segments:
29
31
  - 0
30
32
  version: "0"
@@ -56,6 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
58
  requirements:
57
59
  - - ">="
58
60
  - !ruby/object:Gem::Version
61
+ hash: 3
59
62
  segments:
60
63
  - 0
61
64
  version: "0"
@@ -64,13 +67,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
67
  requirements:
65
68
  - - ">="
66
69
  - !ruby/object:Gem::Version
70
+ hash: 3
67
71
  segments:
68
72
  - 0
69
73
  version: "0"
70
74
  requirements: []
71
75
 
72
76
  rubyforge_project: database_validation
73
- rubygems_version: 1.3.7
77
+ rubygems_version: 1.4.1
74
78
  signing_key:
75
79
  specification_version: 3
76
80
  summary: Automatic Rails validations from your database