jeudi 10 décembre 2015

How to make Pundit policy

How to make below code to a pundit policy.

 def poster_not_authorize
if @job.posters.first == @current_user
  true
else
  false
end
end

how to make this in pundit policay in RUBY in a controller and identify it somewhere so the authenticqation can be checked.

Aucun commentaire:

Enregistrer un commentaire