diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 95f2992..19ea288 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,4 +1,9 @@ class HomeController < ApplicationController def index + @rsvp_by_date = rsvp_by_date + end + + def rsvp_by_date + ENV["RSVP_DATE"] || "April 20, 2025" end end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index b79cee0..d0946e3 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -17,9 +17,7 @@ Registry How We Met More Info - - - + RSVP @@ -39,8 +37,8 @@ -
@@ -140,8 +136,8 @@ choose something meaningful to you! - diff --git a/config/routes.rb b/config/routes.rb index 300262a..544f648 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,6 +12,8 @@ Rails.application.routes.draw do get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker get "manifest" => "rails/pwa#manifest", as: :pwa_manifest + get "/rsvp" => redirect("https://withjoy.com/adam-and-jillian-jun-25/rsvp") + get "/registry" => redirect("https://withjoy.com/adam-and-jillian-jun-25/registry") get "*path" => redirect("/") # Defines the root path route ("/") # root "posts#index"