effective_cpd 0.6.3 → 0.6.5

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
  SHA256:
3
- metadata.gz: 78d4f1d10a4677a8923a20ee6963d81008ff5b9c159c780b430cb9d1544f28e6
4
- data.tar.gz: db03fa1f6b31fad1d5814f02ef6d6f5845d5b0edd9a065c93a1db858379e6f22
3
+ metadata.gz: 4773c3b6961452cc64a5378b56d7227bab9c08df6bfc812d82f433988d8dfb03
4
+ data.tar.gz: e92d9b394e070adeb054cf19ecf72ab6dd36a16dc144021fd7aa249bc33bbfd9
5
5
  SHA512:
6
- metadata.gz: c8edc165c14ee5d5e7608c40d505b871520667b73ab30990d7190b476c53abbc4363e35c5b3513f12c36a8fded06b4f2e94d8866d379b362e2a8a395218d7929
7
- data.tar.gz: d113818c3c472573a3a5cedfda31d80dc9cdab30de236e5c57611968d898d9868b0abe436b075695219fd2c24b9ff98e29179981f906ba377d8025a74eb15839
6
+ metadata.gz: 3fa597aabce1172fd1070d7d907eea1eb0452d44d3e920ca0b4d553f96b5c3ef8901cdf9714c7ac0b44c61a615f45665ae00a78e83acd7da5171759730ce3a89
7
+ data.tar.gz: 26b1acedec51bd60c81a485de86cc35d084d8bb16e8e7648e3c84a0b48743b603fedba909c9a4c3b48554fc59ed12a50a70c8dbe1414a9be3ffe452b350115e7
@@ -166,6 +166,8 @@ module Effective
166
166
  )
167
167
 
168
168
  existing.files.each do |file|
169
+ next if activity.files.any? { |f| file.filename.to_s == f.filename.to_s }
170
+
169
171
  blob = EffectiveResources.clone_blob(file.blob)
170
172
  activity.files.attach(blob)
171
173
  end
@@ -57,12 +57,6 @@ module Effective
57
57
  self.errors.add(:base, "cycle is unavailable") unless cpd_statement.cpd_cycle.available?
58
58
  end
59
59
 
60
- def destroy
61
- return false if cpd_statement.completed?
62
- return false unless cpd_statement.cpd_cycle.available?
63
- super
64
- end
65
-
66
60
  def to_s
67
61
  (cpd_activity || 'activity').to_s
68
62
  end
@@ -12,9 +12,8 @@
12
12
  - if resource.cpd_cycle.complete_content.present?
13
13
  .mb-2= resource.cpd_cycle.complete_content.to_s
14
14
 
15
- = link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
15
+ .mb-4= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
16
16
 
17
17
  = render('effective/cpd_statements/cpd_statement', cpd_statement: resource)
18
18
 
19
- %hr
20
19
  = link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_cpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-24 00:00:00.000000000 Z
11
+ date: 2022-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails