Skip to content
Snippets Groups Projects
Commit 5d7f7407 authored by Teal's avatar Teal
Browse files

order assignments by time

parent e0a014ee
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ class AssignmentsController < ApplicationController
before_action :set_session, :set_users
def index
@assignments = Assignment.all
@assignments = Assignment.all.joins(:session, :user).order('sessions.starts_at')
if params[:user_id]
@assignments = @assignments.where(user_id: params[:user_id])
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment