think_feel_do_engine 3.12.1 → 3.12.2
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 +4 -4
- data/app/controllers/think_feel_do_engine/application_controller.rb +2 -1
- data/app/controllers/think_feel_do_engine/concerns/invalid_auth_token.rb +21 -0
- data/app/views/think_feel_do_engine/coach/patient_dashboards/_active_patient.html.erb +2 -2
- data/config/routes.rb +2 -2
- data/lib/think_feel_do_engine/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e4d81a41dca2e08ff40240e59b0d66c127831e
|
4
|
+
data.tar.gz: 9ea3ae94bbe6ed2dedd7a57cdfda73369b8d5caf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f655994ab605059ff192c8afb13063446349629bd2a1f288f3d15c68d565825eabd6f72aa87c306398c8860c44c3004065a1c2970525f1c512a12049ac97fdee
|
7
|
+
data.tar.gz: 557b7979e7bd05a5ee513458cdb55b5815ed2871cae675c5ab28549547f5d6847c528c4a49d0a71897afd79914fe05fb8cc08cf6eb267a6b3336e3299498b5ba
|
@@ -4,7 +4,8 @@ module ThinkFeelDoEngine
|
|
4
4
|
# Site-wide controller superclass.
|
5
5
|
# Inherits from host's ApplicationController.
|
6
6
|
class ApplicationController < ::ApplicationController
|
7
|
-
include
|
7
|
+
include Concerns::BrowserDetective
|
8
|
+
include Concerns::InvalidAuthToken
|
8
9
|
|
9
10
|
CSRF_COOKIE_NAME = "XSRF-TOKEN"
|
10
11
|
CSRF_HEADER_NAME = "X-XSRF-TOKEN"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module ThinkFeelDoEngine
|
2
|
+
module Concerns
|
3
|
+
# Rescues exception when authenticity token has expired
|
4
|
+
module InvalidAuthToken
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
rescue_from ActionController::InvalidAuthenticityToken,
|
9
|
+
with: :invalid_auth_token_redirect
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def invalid_auth_token_redirect
|
15
|
+
redirect_to "/",
|
16
|
+
alert: "Your authenticity token expired. "\
|
17
|
+
"Please try again."
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<%= button_to "Discontinue",
|
89
89
|
think_feel_do_engine.discontinue_membership_path(view_membership(patient, @group).id),
|
90
90
|
data: { confirm: "Are you sure you would like to end this study? You will not be able to undo this." },
|
91
|
-
method: :
|
91
|
+
method: :put,
|
92
92
|
class: "btn btn-primary" %>
|
93
93
|
</td>
|
94
94
|
<% end %>
|
@@ -96,7 +96,7 @@
|
|
96
96
|
<%= button_to "Terminate Access",
|
97
97
|
think_feel_do_engine.withdraw_membership_path(view_membership(patient, @group).id),
|
98
98
|
data: { confirm: "Are you sure you would like to terminate access to this membership? This option should also be used before changing membership of the patient to a different group or to completely revoke access to this membership. You will not be able to undo this." },
|
99
|
-
method: :
|
99
|
+
method: :put,
|
100
100
|
class: "btn btn-danger" %>
|
101
101
|
</td>
|
102
102
|
<% end %>
|
data/config/routes.rb
CHANGED
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.12.
|
4
|
+
version: 3.12.2
|
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-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -393,6 +393,7 @@ files:
|
|
393
393
|
- app/controllers/think_feel_do_engine/coach/site_messages_controller.rb
|
394
394
|
- app/controllers/think_feel_do_engine/coach_dashboard_controller.rb
|
395
395
|
- app/controllers/think_feel_do_engine/concerns/browser_detective.rb
|
396
|
+
- app/controllers/think_feel_do_engine/concerns/invalid_auth_token.rb
|
396
397
|
- app/controllers/think_feel_do_engine/concerns/navigator_enabled.rb
|
397
398
|
- app/controllers/think_feel_do_engine/keep_alive_controller.rb
|
398
399
|
- app/controllers/think_feel_do_engine/lesson_slides_controller.rb
|