display only not ended assignments in assignment main index

parent 4aa42654
Pipeline #13081 failed with stage
in 16 minutes and 1 second
......@@ -3,7 +3,7 @@ class AssignmentsController < ApplicationController
def index
authorize Assignment
@q = policy_scope(Assignment).ransack(params[:q])
@q = policy_scope(Assignment).no_end.ransack(params[:q])
@q.sorts = ['period_start desc'] if @q.sorts.empty?
@assignments = @q.result
activity_filter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment