Class: Gaku::ContactSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/gaku/contact_serializer.rb

Instance Method Summary collapse

Instance Method Details

#student_contact?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/serializers/gaku/contact_serializer.rb', line 10

def student_contact?
  object.contactable_type == 'Gaku::Student'
end

#student_idObject



6
7
8
# File 'app/serializers/gaku/contact_serializer.rb', line 6

def student_id
  object.contactable_id
end