d3fce41e60
no functional change here, but familiar Rails users will see view files in the locations they expect. this also slightly simplifies controller code there is one attendant change in the wiki at `rails_3/A1-SQL-Injection-Interpolation.md` that I'm happy to make after the PR is merged.
27 lines
449 B
Ruby
27 lines
449 B
Ruby
class DashboardController < ApplicationController
|
|
skip_before_action :has_info
|
|
|
|
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])
|
|
end
|
|
|
|
def bar_graph
|
|
render :bar_graph, layout: false
|
|
end
|
|
|
|
def pie_charts
|
|
@user = current_user
|
|
render :dashboard_stats, layout: false
|
|
end
|
|
|
|
end
|