This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/serializers/invite_serializer.rb
2020-06-09 20:49:32 +05:30

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