validates_existence 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rails3.rb +3 -1
  2. metadata +20 -28
@@ -48,8 +48,10 @@ module Perfectline
48
48
  errors << (attribute.to_s.ends_with?("_id") ? normalized : foreign_key)
49
49
  end
50
50
 
51
+ messages = [:"#{record.class.i18n_scope}.errors.messages.existence", "does not exist"]
52
+
51
53
  errors.each do |error|
52
- record.errors.add(error, options[:message], :message => "does not exist")
54
+ record.errors.add(error, options[:message], :message => messages)
53
55
  end
54
56
  end
55
57
  end
metadata CHANGED
@@ -1,30 +1,26 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: validates_existence
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.1
4
5
  prerelease:
5
- version: 0.7.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Tanel Suurhans
9
9
  - Tarmo Lehtpuu
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2011-06-15 00:00:00 Z
13
+ date: 2011-10-26 00:00:00.000000000Z
15
14
  dependencies: []
16
-
17
15
  description: A library for validating model association existence.
18
- email:
16
+ email:
19
17
  - tanel.suurhans@perfectline.ee
20
18
  - tarmo.lehtpuu@perfectline.ee
21
19
  executables: []
22
-
23
20
  extensions: []
24
-
25
- extra_rdoc_files:
21
+ extra_rdoc_files:
26
22
  - README.markdown
27
- files:
23
+ files:
28
24
  - README.markdown
29
25
  - install.rb
30
26
  - lib/rails2.rb
@@ -33,30 +29,26 @@ files:
33
29
  - rails/init.rb
34
30
  homepage: http://github.com/perfectline/validates_existence/tree/master
35
31
  licenses: []
36
-
37
32
  post_install_message:
38
33
  rdoc_options: []
39
-
40
- require_paths:
34
+ require_paths:
41
35
  - lib
42
- required_ruby_version: !ruby/object:Gem::Requirement
36
+ required_ruby_version: !ruby/object:Gem::Requirement
43
37
  none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: "0"
48
- required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
43
  none: false
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
54
48
  requirements: []
55
-
56
49
  rubyforge_project:
57
- rubygems_version: 1.7.2
50
+ rubygems_version: 1.8.6
58
51
  signing_key:
59
52
  specification_version: 3
60
53
  summary: Validates Rails model belongs_to association existence.
61
54
  test_files: []
62
-