approval2 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODE5NDM4YWIxMmQwNTE5ODE2NzEwYmFmODJkZDFmMGY5YmE0YTI4MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjBkNzAwZTMxODdhODEwNzQ5OWQ0YzNiNTBiMjkxNDg0NzA3MjVkZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWMxNTYxZWNjNjJmMzIxM2QxZmRiNmJhMjU0MzgzNWJlYmI2ODFlYWI3YjAx
|
10
|
+
OTZlZGNiZWFlMzY5MzAzNjQ2MTExNGRkZWU5YmQ0YTk4MDQ3MDk2Y2MwNjFj
|
11
|
+
OTY2MWFhN2U1YjM2ODEzMTAzNGM5NWIwNjRkMjczNjIyNWNhZjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGZiYzM0NDc3ZDBjMjcyNmFmZDEyMGQ5NGU5YTY1NWM0OGQ2NTA4ODY5NzJk
|
14
|
+
NmMxNjE3NGMyZTMzNDk0ZDkzMWNlOTI0NGE3MTA2M2MwN2MyYzJmOGRhMGY0
|
15
|
+
NDA3MGIyN2EyZDIzYWFjNTg5NjQ0OTNlOTRkNWRmNTg5YWNkM2U=
|
data/README.md
CHANGED
@@ -51,10 +51,12 @@ All unique indexes on the model need to be modified to include 'approval_status'
|
|
51
51
|
|
52
52
|
### Create
|
53
53
|
When a record is created, it has approval_status 'U', and a entry is added to unapproved_records.
|
54
|
+
|
54
55
|
When the record is approved, the approval_status is updated from 'U' to 'A'
|
55
56
|
|
56
57
|
### Edit
|
57
|
-
When a record is edited, a clone of the record is created. This clone has approval_status = 'U and the approved_version and approved_id is set to the
|
58
|
+
When a record is edited, a clone of the record is created. This clone has approval_status = 'U and the approved_version and approved_id is set to the lock_version & id of the record that was edited. This clone is persisted, and you now have 2 records in the table, one with approval_status = A (the record that was edited, but without any changes), and one with approval_status = U (the clone, with the changes applied).
|
59
|
+
|
58
60
|
When the changes are approved, the record with approval_status = 'A' is deleted, and the approval_status of the cloned record is changed from 'U' to 'A'. To prevent buried updates, this is done only if the lock_version of the A record is still the same as the approved_version of the U record . ( It is expected that any application that updates such records increments lock_version whenever it updates an A record)
|
59
61
|
|
60
62
|
|
data/lib/approval2/version.rb
CHANGED
@@ -18,6 +18,6 @@
|
|
18
18
|
= record[:record_type]
|
19
19
|
%td{:style=>'text-align:left;'}
|
20
20
|
- if record[:record_type] == 'IncomingFile'
|
21
|
-
= link_to record[:record_count], {:controller => record[:record_type].tableize, :action => :index, :approval_status => 'U', :sc_service =>
|
21
|
+
= link_to record[:record_count], {:controller => record[:record_type].tableize, :action => :index, :approval_status => 'U', :sc_service => params[:sc_service]}
|
22
22
|
- else
|
23
23
|
= link_to record[:record_count], {:controller => record[:record_type].tableize, :action => :index, :approval_status => 'U'}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: approval2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akil
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|