discourse/app/serializers/user_field_serializer.rb
2015-07-30 14:53:13 -04:00

20 lines
386 B
Ruby

class UserFieldSerializer < ApplicationSerializer
attributes :id,
:name,
:description,
:field_type,
:editable,
:required,
:show_on_profile,
:position,
:options
def options
object.user_field_options.pluck(:value)
end
def include_options?
options.present?
end
end