localized_each_validator 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.textile +7 -3
- data/VERSION +1 -1
- data/lib/localized_each_validator.rb +1 -0
- data/localized_each_validator.gemspec +1 -1
- metadata +3 -3
data/LICENSE
CHANGED
data/README.textile
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
h1. Localized @EachValidator@
|
2
2
|
|
3
3
|
| *Author* | Tim Morgan |
|
4
|
-
| *Version* | 1.0 (Oct 31, 2010) |
|
4
|
+
| *Version* | 1.0.1 (Oct 31, 2010) |
|
5
5
|
| *License* | Released under the MIT license. |
|
6
6
|
|
7
7
|
h2. About
|
8
8
|
|
9
|
-
Localized @EachValidator@ is a subclass of ActiveRecord's @EachValidator@ that
|
9
|
+
Localized @EachValidator@ is a subclass of ActiveRecord's @EachValidator@ that
|
10
|
+
makes it easier to write a localized validator with Rails 3's localization. It's
|
11
|
+
small and simple.
|
10
12
|
|
11
13
|
h2. Usage
|
12
14
|
|
13
|
-
Add this gem to your project's @Gemfile@, or to your own validator gem's
|
15
|
+
Add this gem to your project's @Gemfile@, or to your own validator gem's
|
16
|
+
dependencies. Then, sublass @LocalizedEachValidator@ and provide the @error_key@
|
17
|
+
and override the @valid?@ method, like so:
|
14
18
|
|
15
19
|
<pre><code>
|
16
20
|
class FourValidator < ActiveRecord::EachValidator
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 1
|
9
|
+
version: 1.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Tim Morgan
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
hash:
|
85
|
+
hash: 2150682735534993403
|
86
86
|
segments:
|
87
87
|
- 0
|
88
88
|
version: "0"
|