feat(cops): clean rubocop run
1. ignoring one file because it's an intentional vuln 2. made a few small semantic changes, but verified that they're equivalent.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
class DashboardController < ApplicationController
|
||||
skip_before_action :has_info
|
||||
layout false, only: [:change_graph]
|
||||
|
||||
def home
|
||||
@user = current_user
|
||||
@@ -13,15 +14,12 @@ class DashboardController < ApplicationController
|
||||
|
||||
def change_graph
|
||||
self.try(params[:graph])
|
||||
end
|
||||
|
||||
def bar_graph
|
||||
render :bar_graph, layout: false
|
||||
if params[:graph] == "bar_graph"
|
||||
render "dashboard/bar_graph"
|
||||
else
|
||||
@user = current_user
|
||||
render "dashboard/pie_charts"
|
||||
end
|
||||
end
|
||||
|
||||
def pie_charts
|
||||
@user = current_user
|
||||
render :dashboard_stats, layout: false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user