Class: Dunlop::DashboardController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ApplicationController
- Dunlop::DashboardController
- Defined in:
- app/controllers/dunlop/dashboard_controller.rb
Instance Method Summary collapse
-
#active_mode ⇒ Object
POST /active_mode.
-
#archived_mode ⇒ Object
POST /archived_mode.
- #badge_info ⇒ Object
- #changelog ⇒ Object
- #home ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#active_mode ⇒ Object
POST /active_mode
33 34 35 36 |
# File 'app/controllers/dunlop/dashboard_controller.rb', line 33 def active_mode session[:archived_mode] = false redirect_to main_app.root_path end |
#archived_mode ⇒ Object
POST /archived_mode
27 28 29 30 |
# File 'app/controllers/dunlop/dashboard_controller.rb', line 27 def archived_mode session[:archived_mode] = true redirect_to main_app.root_path end |
#badge_info ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/dunlop/dashboard_controller.rb', line 5 def badge_info @process_class = params[:resource].to_s.classify.safe_constantize render nothing: true and return unless @process_class if params[:id].present? setup_badge_info_for_record else if @process_class.ancestors.include?(WorkflowInstance) setup_badge_info_for_scenario else setup_badge_info_for_subprocess end end render layout: false end |
#changelog ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/dunlop/dashboard_controller.rb', line 20 def changelog markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) html = markdown.render File.read(Rails.root.join('CHANGELOG.md')) render html: html.html_safe, layout: true end |
#home ⇒ Object
2 3 |
# File 'app/controllers/dunlop/dashboard_controller.rb', line 2 def home end |