samedi 18 mai 2019

Ordering of data according to date is returning a server error

I am trying to view the items according to an ordered sequence of date attribute (not created_at) and time attribute, but a GET http://localhost:4200/events 500 (Internal Server Error) is being returned. The ordering is working on every other attribute.

This is my index function in the controller:

def index
    render json: Event.order(eventDate: :asc, startTime: :asc)
end




Aucun commentaire:

Enregistrer un commentaire