refactors Admin#name_and_email
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
class Administrator < ActiveRecord::Base
|
||||
belongs_to :user, touch: true
|
||||
delegate :name, :email, to: :user
|
||||
delegate :name, :email, :name_and_email, to: :user
|
||||
|
||||
validates :user_id, presence: true, uniqueness: true
|
||||
|
||||
def name_and_email
|
||||
"#{name} (#{email})"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user