mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:17:08 +08:00
0c42a29dc4
The first thing we needed here was an enum rather than a boolean to determine how a directory_column was created. Now we have `automatic`, `user_field` and `plugin` directory columns. This plugin API is assuming that the plugin has added a migration to a column to the `directory_items` table. This was created to be initially used by discourse-solved. PR with API usage - https://github.com/discourse/discourse-solved/pull/137/
14 lines
322 B
Ruby
14 lines
322 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DirectoryColumnSerializer < ApplicationSerializer
|
|
attributes :id,
|
|
:name,
|
|
:type,
|
|
:enabled,
|
|
:automatic_position,
|
|
:position,
|
|
:icon
|
|
|
|
has_one :user_field, serializer: UserFieldSerializer, embed: :objects
|
|
end
|