Skip to content

Commit

Permalink
Remove hard-code DEFAULT_CREATED_BY_EMAIL
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme Nathan committed Apr 12, 2018
1 parent 18c51b7 commit 3486072
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/app/models/spree/store_credit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class Spree::StoreCredit < Spree::PaymentSource
ADJUSTMENT_ACTION = 'adjustment'
INVALIDATE_ACTION = 'invalidate'

DEFAULT_CREATED_BY_EMAIL = "spree@example.com"

belongs_to :user, class_name: Spree::UserClassHandle.new
belongs_to :created_by, class_name: Spree::UserClassHandle.new
belongs_to :category, class_name: "Spree::StoreCreditCategory"
Expand Down Expand Up @@ -196,12 +194,6 @@ def invalidate(reason, user_performing_invalidation)
end
end

class << self
def default_created_by
Spree.user_class.find_by(email: DEFAULT_CREATED_BY_EMAIL)
end
end

private

def create_credit_record(amount, action_attributes = {})
Expand Down

0 comments on commit 3486072

Please sign in to comment.