Don't crash in development if the Rails master key is missing

Oops, right, this meta tag that runs on all pages currently crashes if
we can't read the credentials file!

Instead, let's just allow this value to be `nil` if not present.
This commit is contained in:
Emi Matchu 2024-05-02 13:13:54 -07:00
parent c751173c52
commit c74d9fa735

View file

@ -101,7 +101,8 @@ module ApplicationHelper
def impress_2020_meta_tags def impress_2020_meta_tags
origin = Rails.configuration.impress_2020_origin origin = Rails.configuration.impress_2020_origin
support_secret = Rails.application.credentials.impress_2020.support_secret support_secret = Rails.application.credentials.dig(
:impress_2020, :support_secret)
capture do capture do
concat tag("meta", name: "impress-2020-origin", content: origin) concat tag("meta", name: "impress-2020-origin", content: origin)