User can see archived file in principal list

This commit is contained in:
Xavier J 2015-11-27 15:04:44 +01:00
parent 1e1a6b3693
commit e9012d8164
3 changed files with 11 additions and 4 deletions

View file

@ -2,7 +2,7 @@ class Users::DossiersController < UsersController
before_action :authenticate_user!
def index
@dossiers = current_user.dossiers.where("state NOT IN ('draft')").order(updated_at: 'DESC')
@dossiers = current_user.dossiers.where.not(state: :draft).where(archived: false).order(updated_at: 'DESC')
if params[:page].nil?
params[:page] = 1