approval2 0.1.5 → 0.1.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWM5N2Q5OTBiNDE3MDRiZWFmZjE4MWI4NjExMzMxNWJjOTNlMmI2OQ==
4
+ ODE5NDM4YWIxMmQwNTE5ODE2NzEwYmFmODJkZDFmMGY5YmE0YTI4MQ==
5
5
  data.tar.gz: !binary |-
6
- NGM0NjUwNmI5OGIzMjZmM2M0MjUxMjBiN2ZhYTM0ODM3NWNhYjJhMg==
6
+ ZjBkNzAwZTMxODdhODEwNzQ5OWQ0YzNiNTBiMjkxNDg0NzA3MjVkZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGFlOWE3MzM3NDJhOGM1NDE0NDdlMWQ2ODg3ZmUxYjAwYmViNmEyMzk0NmI3
10
- NDc4NDA1ZWE2NTEzZGRjOTRlZWI0MDYzNzc4ODc4ODRiYjQwMjFkMTgzYWIx
11
- ZjAyZjZmY2UyMDNhZGM4NmVjM2YwNDNlOTNmMzk0OWRjMzVkNGM=
9
+ ZWMxNTYxZWNjNjJmMzIxM2QxZmRiNmJhMjU0MzgzNWJlYmI2ODFlYWI3YjAx
10
+ OTZlZGNiZWFlMzY5MzAzNjQ2MTExNGRkZWU5YmQ0YTk4MDQ3MDk2Y2MwNjFj
11
+ OTY2MWFhN2U1YjM2ODEzMTAzNGM5NWIwNjRkMjczNjIyNWNhZjU=
12
12
  data.tar.gz: !binary |-
13
- YWY1YTFhNjFmMDI0M2YxM2ZhMTVlOGEyNTNkNWJlNTI4Y2RhN2I2ODViMjkz
14
- ZTI5ODBmYTVjMTg1NDgzM2U2NDE4YzUwYjYxZTYzYTNiNDk1N2I5NDAwMmVh
15
- YWZhNTQ5MWFkOGZkYmY5MDk4ZjM5ODA2MjE4YjBiMzhhOGM0YzA=
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 id & lock_version 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).
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
 
@@ -53,6 +53,6 @@ module Approval2
53
53
  end
54
54
  end
55
55
 
56
- ActionController::Base.class_eval do
57
- include Approval2::ControllerAdditions
58
- end
56
+ # ActionController::Base.class_eval do
57
+ # include Approval2::ControllerAdditions
58
+ # end
@@ -1,3 +1,3 @@
1
1
  module Approval2
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -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 => 'AML'}
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.5
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-09 00:00:00.000000000 Z
11
+ date: 2017-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler