Reorder code
This commit is contained in:
parent
f4b9f372d2
commit
f93141d0f4
|
@ -12,6 +12,12 @@ class Account < ApplicationRecord
|
||||||
|
|
||||||
self.adapter = Rolify::Adapter::Base.create 'role_adapter', role_cname, name
|
self.adapter = Rolify::Adapter::Base.create 'role_adapter', role_cname, name
|
||||||
|
|
||||||
|
##########
|
||||||
|
# Scopes #
|
||||||
|
##########
|
||||||
|
|
||||||
|
scope :guests, -> { includes(:user).where(users: { id: nil }) }
|
||||||
|
|
||||||
################
|
################
|
||||||
# Associations #
|
# Associations #
|
||||||
################
|
################
|
||||||
|
@ -38,12 +44,6 @@ class Account < ApplicationRecord
|
||||||
|
|
||||||
has_many :passport_confirmations, dependent: :restrict_with_exception
|
has_many :passport_confirmations, dependent: :restrict_with_exception
|
||||||
|
|
||||||
##########
|
|
||||||
# Scopes #
|
|
||||||
##########
|
|
||||||
|
|
||||||
scope :guests, -> { includes(:user).where(users: { id: nil }) }
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# Callbacks #
|
# Callbacks #
|
||||||
#############
|
#############
|
||||||
|
|
Reference in New Issue