discourse/app/serializers/screened_email_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
311 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class ScreenedEmailSerializer < ApplicationSerializer
2013-08-02 09:30:13 +08:00
attributes :email, :action, :match_count, :last_match_at, :created_at, :ip_address, :id
2013-08-02 09:30:13 +08:00
def action
ScreenedEmail.actions.key(object.action_type).to_s
2013-08-02 09:30:13 +08:00
end
def ip_address
object.ip_address.try(:to_s)
end
2013-08-02 09:30:13 +08:00
end