rails-schema-validations 0.5 → 0.5.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/README +12 -8
  2. metadata +3 -2
data/README CHANGED
@@ -1,13 +1,17 @@
1
- add validations to your models automatically based on the schema with:
1
+ Add validations to your models automatically based on the schema constraints.
2
+ Place this one line in your model:
2
3
 
3
4
  validations_from_schema
4
5
 
5
- | schema type | rails validation |
6
- |-------------|---------------------------|
7
- | non-null | validates_presence_of |
8
- | limit | validates_length_of |
9
- | integer | validates_numericality_of |
10
- | float | validates_numericality_of |
11
6
 
7
+ | schema type | rails validation | extra |
8
+ |-------------|---------------------------|---------------------------|
9
+ | non-null | validates_presence_of | |
10
+ | string | validates_length_of | :limit |
11
+ | integer | validates_numericality_of | :only_integer, :less_than |
12
+ | float | validates_numericality_of | |
12
13
 
13
- Tested on MySQL
14
+
15
+ Tested on MySQL.
16
+ Does not detect what database is being used.
17
+ This gem may have problems on other databases, particularly Sqlite.
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-schema-validations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- version: "0.5"
9
+ - 1
10
+ version: 0.5.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Greg Weber