Skip to content

Commit

Permalink
use Hash#fetch to retrieve ENV variable with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonborg committed Aug 14, 2017
1 parent a8d1c11 commit a5484cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/office_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class OfficeLocation < ApplicationRecord

# Set a "PYR_S3_BUCKET" environment variable to your own S3 Bucket
# if you want to use your own generated QR Codes.
S3_BUCKET = ENV['PYR_S3_BUCKET'] || 'phone-your-rep-images'
S3_BUCKET = ENV.fetch('PYR_S3_BUCKET') { 'phone-your-rep-images' }.freeze

belongs_to :rep, foreign_key: :official_id, primary_key: :official_id
has_many :issues
Expand Down

0 comments on commit a5484cb

Please sign in to comment.