diff --git a/app/models/account.rb b/app/models/account.rb index f55ab9f..6c9e548 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -12,6 +12,12 @@ class Account < ApplicationRecord self.adapter = Rolify::Adapter::Base.create 'role_adapter', role_cname, name + ########## + # Scopes # + ########## + + scope :guests, -> { includes(:user).where(users: { id: nil }) } + ################ # Associations # ################ @@ -38,12 +44,6 @@ class Account < ApplicationRecord has_many :passport_confirmations, dependent: :restrict_with_exception - ########## - # Scopes # - ########## - - scope :guests, -> { includes(:user).where(users: { id: nil }) } - ############# # Callbacks # #############