DEV: Use the `only` option when returning groups as json (#296)
This commit is contained in:
parent
e8beeca5c5
commit
489aacf156
|
@ -44,7 +44,7 @@ module ::DiscourseDataExplorer
|
||||||
end
|
end
|
||||||
|
|
||||||
def groups
|
def groups
|
||||||
render json: Group.all.select(:id, :name), root: false
|
render json: Group.all.select(:id, :name).as_json(only: %i[id name]), root: false
|
||||||
end
|
end
|
||||||
|
|
||||||
def group_reports_index
|
def group_reports_index
|
||||||
|
|
Loading…
Reference in New Issue