Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
show all
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
DashboardController, EditRequestsController, MediafluxInfoController, ProjectImportController, ProjectsController, RequestSubmitController, RequestWizardsController, RequestsController, Users::MediafluxCallbacksController, UsersController, WelcomeController
Instance Method Summary
collapse
Instance Method Details
#add_breadcrumb(name, path = nil) ⇒ Object
30
31
32
|
# File 'app/controllers/application_controller.rb', line 30
def add_breadcrumb(name, path = nil)
breadcrumbs << Breadcrumb.new(name, path)
end
|
#after_sign_in_path_for(_resource) ⇒ Object
17
18
19
20
|
# File 'app/controllers/application_controller.rb', line 17
def after_sign_in_path_for(_resource)
mediaflux_passthru_path
end
|
#breadcrumbs ⇒ Object
26
27
28
|
# File 'app/controllers/application_controller.rb', line 26
def breadcrumbs
@breadcrumbs ||= []
end
|
#new_session_path(_scope) ⇒ Object
13
14
15
|
# File 'app/controllers/application_controller.rb', line 13
def new_session_path(_scope)
new_user_session_path
end
|
#render_not_found ⇒ Object
Render a 404 page for any undefined route
35
36
37
|
# File 'app/controllers/application_controller.rb', line 35
def render_not_found
render file: Rails.public_path.join("404.html").to_s, layout: false, status: :not_found
end
|
#require_admin_user ⇒ Object
22
23
24
|
# File 'app/controllers/application_controller.rb', line 22
def require_admin_user
head :forbidden unless current_user&.eligible_sysadmin?
end
|