think_feel_do_engine 3.10.8 → 3.10.9

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: de6777eaf766d0650c146ff339bdcf05481f4ba8
4
- data.tar.gz: 3a4151a8600ef06cb1675daf6ade76673eef81d2
3
+ metadata.gz: 91eba79f3d56649e383d2e76ab0ea215b66eb9e6
4
+ data.tar.gz: df4f2174974f17506c9b85fb8e4226272087e5d6
5
5
  SHA512:
6
- metadata.gz: cf6c0be2973c3e388270276e14e8a885361dcfd9ff0351b3e6fe53f0856bf7e635cabaf24887135a9efbeebaa72af8e352a4814545e83503ec7e8816ae5c6060
7
- data.tar.gz: 53940270a64c819175d755b130ce1ed9de91efc57835781a51613860cd7e67535e005b996c19f9bc01f4fbd0e679982c8ae13beb748b4339cdb2e16796af4797
6
+ metadata.gz: 13bd56a451dafec68ef481b13b8ff78f2fe880f6880aa01bf7758cae363d129dfd755fa4ebc24f57837d40be4560d57df6fb3b0cd4025c125e0db20b127a605f
7
+ data.tar.gz: 9ed6cde49fac3ba8cdb3ff4ff6769d5f763de2af3eb288b51a7d05a6348a0cb2fd2b6975c5dc9cf71bd40eab2a7ecbc546a6bc0d040faf028f12baa61b6821ce
data/README.md CHANGED
@@ -52,3 +52,13 @@ Set up the database
52
52
  run the specs
53
53
 
54
54
  ./bin/rake
55
+
56
+ #3 Publishing to RubyGems
57
+
58
+ ```console
59
+ gem build think_feel_do_engine.gemspec
60
+ ```
61
+
62
+ ```console
63
+ gem push think_feel_do_engine-x.x.x.gem
64
+ ```
@@ -5,28 +5,23 @@ module ThinkFeelDoEngine
5
5
  before_action :authenticate_user!, :set_group
6
6
  before_action :set_patient, only: :show
7
7
 
8
- # rubocop:disable Metrics/LineLength
9
8
  def index
10
9
  authorize! :show, Participant
11
-
12
- if @group.participants
13
- if "false" == params[:active]
14
- @active_patients = false
15
- @participants = Participant
16
- .joins(:memberships)
17
- .where("memberships.group_id = ?", @group.id)
18
- .inactive
19
- else
20
- @active_patients = true
21
- @participants = Participant
22
- .joins(:memberships)
23
- .where("memberships.group_id = ? AND " \
24
- "memberships.is_complete = false", @group.id)
25
- .active
26
- end
10
+ if params[:active] == "false"
11
+ @active_patients = false
12
+ @participants = Participant
13
+ .joins(:memberships)
14
+ .where("memberships.group_id = ?", @group.id)
15
+ .inactive
16
+ else
17
+ @active_patients = true
18
+ @participants = Participant
19
+ .joins(:memberships)
20
+ .where("memberships.group_id = ? AND " \
21
+ "memberships.is_complete = false", @group.id)
22
+ .active
27
23
  end
28
24
  end
29
- # rubocop:enable Metrics/LineLength
30
25
 
31
26
  def show
32
27
  authorize! :show, @participant
@@ -46,17 +41,26 @@ module ThinkFeelDoEngine
46
41
 
47
42
  def learning_modules
48
43
  ContentModules::LessonModule
49
- .where(
50
- bit_core_tool_id: tool_ids
51
- )
44
+ .where(bit_core_tool_id: tool_ids)
52
45
  end
53
46
 
54
47
  def set_group
55
48
  @group = Group.find(params[:group_id])
49
+ rescue ActiveRecord::RecordNotFound
50
+ message = "Group can't be found."
51
+ if defined?(think_feel_do_dashboard)
52
+ redirect_to think_feel_do_dashboard.groups_path,
53
+ alert: message
54
+ else
55
+ redirect_to "/", alert: message
56
+ end
56
57
  end
57
58
 
58
59
  def set_patient
59
60
  @participant = @group.participants.find(params[:id])
61
+ rescue ActiveRecord::RecordNotFound
62
+ redirect_to coach_group_patient_dashboards_path(@group),
63
+ alert: "Participant can't be found."
60
64
  end
61
65
 
62
66
  def tool_ids
@@ -1,4 +1,4 @@
1
1
  # nodoc
2
2
  module ThinkFeelDoEngine
3
- VERSION = "3.10.8"
3
+ VERSION = "3.10.9"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: think_feel_do_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.8
4
+ version: 3.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Carty-Fickes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-22 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -942,7 +942,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
942
942
  version: '0'
943
943
  requirements: []
944
944
  rubyforge_project:
945
- rubygems_version: 2.5.1
945
+ rubygems_version: 2.4.6
946
946
  signing_key:
947
947
  specification_version: 4
948
948
  summary: Summary of ThinkFeelDoEngine.