effective_cpd 0.1.16 → 0.1.17

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30c4b5c729e67d3ad63505d91bf53b705cd0fff7b6af6fc227857fee4f525fcd
4
- data.tar.gz: 3a5602f9711251984c723d5042cb15fdadc064ed40d38e3fcc83389c6e1a04c7
3
+ metadata.gz: 15720d3f1133258119fc998d1a973095b6bfc0976acbb2b141c136de3ea7c017
4
+ data.tar.gz: 5a81f0179b1ad375fa5c293c0efbc98f7f3d986f068be77c1664ec4b1105d545
5
5
  SHA512:
6
- metadata.gz: 7efa6a61be4d0fca14becac4296a21b4375a6ce71c2350f3a8b380733bfdbabe1482dc22012bc11c5e9f4a464b13666dd77447fecb37918506d387b7402b4f9b
7
- data.tar.gz: 8f6d6564d6c6eb0bd6fced0f9155e37ff7d378578751d1e8793c102d73067902a03f9eab61f6e6b6febe00d29e8d6ea023b6647b6d1e3f8c92790883ff342015
6
+ metadata.gz: 259de0c2499c86a91bc706802515785531e663e36f1ecdf818289278736f224bc6a10bcd4519c74536877516b75b329e2a3d1d6fa0b080b8c509c7569f39c2ab
7
+ data.tar.gz: d75ee4434407c895a10ae5fb472c70335bb1b22ce6bb3d0c552d3380d0a90a42b1ddbb91581328dfbd9162eae1e63ed6007db6618147c5f00db84780ad09d0ec
@@ -3,6 +3,7 @@ module Effective
3
3
  before_action(:authenticate_user!) if defined?(Devise)
4
4
 
5
5
  include Effective::WizardController
6
+ include EffectiveCpdHelper
6
7
 
7
8
  resource_scope do
8
9
  cycle = Effective::CpdCycle.find(params[:cpd_cycle_id])
@@ -18,11 +19,7 @@ module Effective
18
19
  cycle = Effective::CpdCycle.find(params[:cpd_cycle_id])
19
20
  existing = Effective::CpdStatement.where(cpd_cycle: cycle, user: current_user).where.not(id: resource).first
20
21
 
21
- if existing&.completed?
22
- flash[:danger] = "You have already completed a statement for this #{cpd_cycle_label}."
23
- redirect_to(root_path)
24
- elsif existing.present?
25
- flash[:success] = "You have been redirected to the #{resource_wizard_step_title(existing, existing.next_step)} step."
22
+ if existing.present?
26
23
  redirect_to effective_cpd.cpd_cycle_cpd_statement_build_path(existing.cpd_cycle, existing, existing.next_step)
27
24
  end
28
25
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '0.1.16'
2
+ VERSION = '0.1.17'
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.1.16
4
+ version: 0.1.17
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: 2021-10-07 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails