diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3f41cce..ca4154d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4,4 +4,15 @@ module ApplicationHelper def development_mode? Rails.env.development? && ActiveModel::Type::Boolean.new.cast(ENV['MOCK_WEATHER_DATA']) end + + def watched_area_bg_image + case @watched_area.slug + when 'redrock' + 'media/images/redrock-winter-2020-hero.jpg' + when 'castlerock' + 'media/images/castlerock/hero-image.jpg' + when 'stoneypoint' + 'media/images/stoneypoint/hero-image.png' + end + end end diff --git a/app/views/area/watched_area/index.html.erb b/app/views/area/watched_area/index.html.erb index bac7d89..15cd79c 100644 --- a/app/views/area/watched_area/index.html.erb +++ b/app/views/area/watched_area/index.html.erb @@ -9,7 +9,7 @@