I am using Lockbox to encrypt an attribute. But calling valid? always results in "Missing master key".
The master key is specified in credentials.yml.enc as lockbox_master_key: <redacted>. config/initializers/lockbox.rb specifies Lockbox.master_key = Rails.application.credentials.lockbox_master_key.
My model looks like:
class Address < ApplicationRecord
encrypts :line_one
blind_index :line_one
...
I appreciate any pointers on what is causing the exception.
Note: I have tried putsing Lockbox.master_key and it prints the correct decrypted value.