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 ablepull/1/head
parent
1186579d1b
commit
48f2d64c71
@ -1,8 +1,16 @@
|
||||
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
|
||||
|
||||
Loading…
Reference in new issue