mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Convert all CoffeeScript to Javascript. See:
http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
class SiteSerializer < ApplicationSerializer
|
||||
|
||||
attributes :default_archetype, :notification_types
|
||||
attributes :default_archetype,
|
||||
:notification_types,
|
||||
:post_types
|
||||
|
||||
has_many :categories, embed: :objects
|
||||
has_many :post_action_types, embed: :objects
|
||||
has_many :trust_levels, embed: :objects
|
||||
has_many :archetypes, embed: :objects, serializer: ArchetypeSerializer
|
||||
|
||||
|
||||
def default_archetype
|
||||
Archetype.default
|
||||
end
|
||||
|
||||
def post_types
|
||||
{regular: Post::REGULAR, moderator_action: Post::MODERATOR_ACTION}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user