simply_stored 0.3.5 → 0.3.6

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.
@@ -34,6 +34,10 @@ module SimplyStored
34
34
  def message(instance)
35
35
  super || "is invalid"
36
36
  end
37
+
38
+ def i18n
39
+ super || "#{i18n_prefix}.invalid"
40
+ end
37
41
  end
38
42
 
39
43
  class ValidatesUniquenessOf < ::Validatable::ValidationBase
@@ -50,6 +54,10 @@ module SimplyStored
50
54
  def message(instance)
51
55
  super || "#{attribute.to_s.try(:humanize) || attribute.to_s} is already taken"
52
56
  end
57
+
58
+ def i18n
59
+ super || "#{i18n_prefix}.not_unique"
60
+ end
53
61
  end
54
62
 
55
63
  def validates_inclusion_of(*args)
data/lib/simply_stored.rb CHANGED
@@ -4,7 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/simply_stored/storage')
4
4
  require File.expand_path(File.dirname(__FILE__) + '/simply_stored/class_methods_base')
5
5
 
6
6
  module SimplyStored
7
- VERSION = '0.3.5'
7
+ VERSION = '0.3.6'
8
8
  class Error < RuntimeError; end
9
9
  class RecordNotFound < RuntimeError; end
10
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simply_stored
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mathias Meyer, Jonathan Weiss