Class: PandaPal::Organization

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/panda_pal/organization.rb

Instance Method Summary collapse

Instance Method Details

#encryption_keyObject



22
23
24
25
26
27
28
29
30
# File 'app/models/panda_pal/organization.rb', line 22

def encryption_key
  # production environment might not have loaded secret_key_base yet.
  # In that case, just read it from env.
  if (Rails.application.secrets.secret_key_base)
    Rails.application.secrets.secret_key_base[0,32]
  else
    ENV["SECRET_KEY_BASE"][0,32]
  end
end