add current_user_dossier function at UserController

This commit is contained in:
Xavier J 2015-10-09 16:26:39 +02:00
parent 3a06c0b870
commit 0bd43e538a
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,9 @@
class UsersController < ApplicationController class UsersController < ApplicationController
before_action :authenticate_user! before_action :authenticate_user!
def current_user_dossier dossier_id=nil
dossier_id ||= params[:dossier_id]
current_user.dossiers.find(dossier_id)
end
end end