add current_user_dossier function at UserController
This commit is contained in:
parent
3a06c0b870
commit
0bd43e538a
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
class UsersController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
def current_user_dossier dossier_id=nil
|
||||
dossier_id ||= params[:dossier_id]
|
||||
|
||||
current_user.dossiers.find(dossier_id)
|
||||
end
|
||||
end
|
0
spec/controllers/users_controller_spec.rb
Normal file
0
spec/controllers/users_controller_spec.rb
Normal file
Loading…
Reference in a new issue