mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Place class methods above instance methods
This commit is contained in:
@@ -45,10 +45,6 @@ class Customer < ApplicationRecord
|
||||
|
||||
attr_accessor :gateway_recurring_payment_client_secret, :gateway_shop_id
|
||||
|
||||
def full_name
|
||||
"#{first_name} #{last_name}".strip
|
||||
end
|
||||
|
||||
def self.find_or_new(email, enterprise_id)
|
||||
Customer.new(email: email, enterprise_id: enterprise_id) unless email.present? && enterprise_id.present?
|
||||
|
||||
@@ -56,6 +52,10 @@ class Customer < ApplicationRecord
|
||||
Customer.new(email: email, enterprise_id: enterprise_id)
|
||||
end
|
||||
|
||||
def full_name
|
||||
"#{first_name} #{last_name}".strip
|
||||
end
|
||||
|
||||
def set_created_manually_flag
|
||||
self.created_manually = true
|
||||
return unless persisted?
|
||||
|
||||
Reference in New Issue
Block a user