mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
TODO- in the future, consider putting this in a credential. We're not able to change the production credentials file currently, but we should change it in the future when we're able
16 lines
377 B
Ruby
16 lines
377 B
Ruby
class HomeController < ActionController::Base
|
|
before_action :set_google_analytics_id
|
|
|
|
def index
|
|
@districts = District.all.order(:name)
|
|
@schools = School.all
|
|
|
|
@categories = Category.sorted.map { |category| CategoryPresenter.new(category: category) }
|
|
end
|
|
|
|
private
|
|
|
|
def set_google_analytics_id
|
|
@google_analytics_id = ENV['GOOGLE_ANALYTICS_ID']
|
|
end
|
|
end
|