From f93141d0f4da71a6d70716fe624dcfbe92827f9f Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 24 Mar 2019 19:09:16 +0500 Subject: [PATCH] Reorder code --- app/models/account.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 # #############