Skip to content

Commit

Permalink
DEV: Use the only option when returning groups as json (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jancernik authored Jun 26, 2024
1 parent e8beeca commit 489aacf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def show
end

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

def group_reports_index
Expand Down

0 comments on commit 489aacf

Please sign in to comment.