From e71fac4f99006676beeb88349c687752035bb58e Mon Sep 17 00:00:00 2001
From: Adam Mohammed
Date: Mon, 17 Feb 2025 10:43:41 -0500
Subject: [PATCH] Add RSVP
---
app/controllers/home_controller.rb | 5 +++++
app/views/home/index.html.erb | 14 +++++---------
config/routes.rb | 2 ++
3 files changed, 12 insertions(+), 9 deletions(-)
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"