Skip to content
Closed

pr #451

Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app/controllers/dashboard_controller2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true
class DashboardController < ApplicationController
skip_before_action :has_info
layout false, only: [:change_graph]

def home
@user = current_user

# See if the user has a font preference
if params[:font]
cookies[:font] = params[:font]
end
end

def change_graph
self.try(params[:graph])

if params[:graph] == "bar_graph"
render "dashboard/bar_graph"
else
@user = current_user
render "dashboard/pie_charts"
end
end
end