mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
14 lines
246 B
Ruby
14 lines
246 B
Ruby
# frozen_string_literal: true
|
|
|
|
class InviteSerializer < ApplicationSerializer
|
|
attributes :id, :email, :updated_at, :expired
|
|
|
|
def include_email?
|
|
options[:show_emails] && !object.redeemed?
|
|
end
|
|
|
|
def expired
|
|
object.expired?
|
|
end
|
|
end
|