datoki 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c7cf6158631c06cff0d2b021367095f5719d0e0
4
- data.tar.gz: 7fe80b415d5d6e2ad255eade769cccd17a35425e
3
+ metadata.gz: 397ce11ce7b856de259198ac22633a0624fa971e
4
+ data.tar.gz: bb53e10c2760b096e7a56fee2a89fc93cbac2b22
5
5
  SHA512:
6
- metadata.gz: b66a2d6b2526db35de9eb130e1a880fc9903099d3c4ab39d5b96d8b140021f7eeae1fe1b5176f56f5a54ebd9350e747a7be8008ed561710b41beec612feb33ca
7
- data.tar.gz: b5d1355790e87ff930f71e05435c10181ac4ab8d0e7c71452c36a1da10d6e6ef419c1c2c7cbdf205705c9a106f7a8bf347440dc7d519469d4b9d3e68aa8b3e0f
6
+ metadata.gz: 48265561168ce8dd52640b1dfd5b2a709cc6201e052922b3a664377590b4ca6b1b8665f704b44a1c00811d030823cef13302bc698998e106ac6889f62decea2d
7
+ data.tar.gz: 7a0ab44c107a3abea4d8173fed8e54a590e7ba9453aca9c27959b7547c2919141c53da09fdea10bfcde9e0c6a69f126a8159e04fcf2e7d8b570b202e69d53fa3
data/README.md CHANGED
@@ -9,5 +9,33 @@ A Ruby gem for managing validation and records using PostgreSQL.
9
9
 
10
10
  ## Usage
11
11
 
12
- No coming any time soon.
12
+ ```ruby
13
+ class Computer
14
+ include Datoki
15
+
16
+ field(:id) { primary_key }
17
+ field(:name) { varchar }
18
+ field(:desc) { text nil, 1, 955 }
19
+
20
+ on :create_or_update? do
21
+
22
+ on :create? do
23
+ clean :name!, :desc
24
+ end
25
+
26
+ on :update? do
27
+
28
+ clean :name, :desc
29
+
30
+ on :special? do
31
+ skip :db
32
+ # do special processing
33
+ end
34
+ end
35
+
36
+ end # === :create_or_update?
37
+
38
+
39
+ end # === class
40
+ ```
13
41
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 2.0.0