diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 88aef02..a165bd5 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -5,6 +5,10 @@ class PagesController < ApplicationController expose(:complex_view?) { COMPLEX_VIEWS.include? params[:id] } + expose(:sponsors) do + YAML.load_file Rails.root.join('config/data/sponsors.yml') + end + rescue_from ActionView::MissingTemplate do |exception| if exception.message.match?(/Missing template pages#{request.path}/) raise ActionController::RoutingError, "No such page: #{params[:id]}" diff --git a/app/views/pages/welcome.html.erb b/app/views/pages/welcome.html.erb index eb709c9..e3afd0f 100644 --- a/app/views/pages/welcome.html.erb +++ b/app/views/pages/welcome.html.erb @@ -40,7 +40,7 @@ About Us -