mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-29 18:46:23 -05:00
4f09d552ed
refactor search code to deal with proper objects use proper serializers, test the controllers
6 lines
283 B
Ruby
6 lines
283 B
Ruby
class GroupedSearchResultSerializer < ApplicationSerializer
|
|
has_many :posts, serializer: SearchPostSerializer
|
|
has_many :users, serializer: BasicUserSerializer
|
|
has_many :categories, serializer: BasicCategorySerializer
|
|
attributes :more_posts, :more_users, :more_categories
|
|
end
|