mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-26 09:08:32 -05:00
19 lines
386 B
Ruby
19 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
|