Skip to content

Commit

Permalink
Return elements in api controller ordered by position
Browse files Browse the repository at this point in the history
This would be expected anyway and fixes a flaky sepc.
  • Loading branch information
tvdeyen committed Apr 17, 2021
1 parent 1469a53 commit 7796ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/alchemy/api/elements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def index
if params[:named].present?
@elements = @elements.named(params[:named])
end
@elements = @elements.includes(*element_includes)
@elements = @elements.includes(*element_includes).order(:position)

render json: @elements, adapter: :json, root: "elements"
end
Expand Down

0 comments on commit 7796ea1

Please sign in to comment.