Class: ThinkFeelDoEngine::ApplicationController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ThinkFeelDoEngine::ApplicationController
show all
- Includes:
- Concerns::BrowserDetective
- Defined in:
- app/controllers/think_feel_do_engine/application_controller.rb
Overview
Site-wide controller superclass. Inherits from host’s ApplicationController.
Direct Known Subclasses
BitMaker::ContentModulesController, BitMaker::ContentProvidersController, BitMaker::SlidesController, BitMaker::SlideshowAnchorsController, BitMaker::SlideshowsController, Coach::GroupDashboardController, Coach::MembershipsController, Coach::MessagesController, Coach::ParticipantActivitiesVisualizationsController, Coach::ParticipantThoughtsVisualizationsController, Coach::PatientDashboardsController, Coach::PhqAssessmentsController, Coach::ReceivedMessagesController, Coach::SentMessagesController, Coach::SiteMessagesController, CoachDashboardController, KeepAliveController, LessonSlidesController, LessonsController, Manage::GroupsController, Manage::TasksController, MembershipsController, NavigatorController, ParticipantDataController, Participants::ActivitiesController, Participants::AssessmentsController, Participants::LessonsController, Participants::MediaAccessEventsController, Participants::PublicSlidesController, Participants::TaskStatusController, Participants::ThoughtsController, PasswordEntropyBitsController, PrivacyPoliciesController, QuickSignInsController
Constant Summary
collapse
- CSRF_COOKIE_NAME =
"XSRF-TOKEN"
"X-XSRF-TOKEN"
- ROOT_URI =
"/"
- INACTIVE_MESSAGE =
"We're sorry, but you can't sign in yet "\
"because you are not assigned to an active group."
Instance Method Summary
collapse
Instance Method Details
#access_denied_resource_path ⇒ Object
43
44
45
46
47
48
49
|
# File 'app/controllers/think_feel_do_engine/application_controller.rb', line 43
def access_denied_resource_path
if defined?(think_feel_do_dashboard)
think_feel_do_dashboard.root_path
else
privacy_policy_path
end
end
|
#after_sign_in_path_for(resource) ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'app/controllers/think_feel_do_engine/application_controller.rb', line 22
def after_sign_in_path_for(resource)
if resource.class == User
if defined?(think_feel_do_dashboard)
think_feel_do_dashboard.root_path
else
privacy_policy_path
end
else
super resource
end
rescue ActionController::UrlGenerationError
ROOT_URI
end
|
#after_sign_out_path_for(resource) ⇒ Object
37
38
39
40
41
|
# File 'app/controllers/think_feel_do_engine/application_controller.rb', line 37
def after_sign_out_path_for(resource)
session[:previous_url] || (
resource == :participant ? main_app.root_path : new_user_session_path
)
end
|