From 22a6861f6fcc32fb7630b20c63b7f0ebc025aa5e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 15 Jun 2023 10:17:35 +1000 Subject: [PATCH] Place class methods above instance methods --- app/models/customer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 5d6dc5c1bd..9aa83b8b9d 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -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?