Files
weddingplan/app/controllers/home_controller.rb
Adam Mohammed 62dc4172b7
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
add wedding party
2025-03-07 19:01:12 -05:00

31 lines
1.2 KiB
Ruby

class HomeController < ApplicationController
Person = Struct.new(:name, :image, :role, :relationship, :extra_attrs)
PARTY_MEMBERS = [
[ "Gemma", true, "Matron of Honor", "Childhood Friend" ],
[ "Meghan", true, "Maid of Honor", "Rock Climbing Friend" ],
[ "Christine", true, "Bridesmaid", "Childhood Friend" ],
[ "Jennie", true, "Bridesmaid", "Rock Climbing Friend" ],
[ "Julia", true, "Bridesmaid", "Sister-in-law" ],
[ "DeAnna", true, "Bridesmaid", "Rock Climbing Friend", "object-left-top" ],
[ "Emil", true, "Best Man", "Adam's Brother", "object-left-top" ],
[ "Ridge", true, "Best Man", "Childhood Friend", "object-left-top" ],
[ "Tom", true, "Groomsman", "Childhood Friend" ],
[ "Eric", true, "Groomsman", "Childhood Friend", "object-top" ],
[ "Toby", true, "Groomsman", "Rock Climbing Friend", "object-top" ],
[ "Zack", true, "Groomsman", "Jillian's Brother" , "object-bottom"]
].map do |name, image, role, relationship, extra|
Person.new(name, image, role, relationship, extra)
end
def index
@rsvp_by_date = rsvp_by_date
@wedding_party = PARTY_MEMBERS
end
def rsvp_by_date
ENV["RSVP_DATE"] || "May 1, 2025"
end
end