Sha256: e2829a32f0bef8d329e782672b6308b69394d5cede058d96a166f8d5d993250d
Contents?: true
Size: 269 Bytes
Versions: 18
Compression:
Stored size: 269 Bytes
Contents
class UserPolicy attr_reader :current_user, :model def initialize(current_user, model) @current_user = current_user @user = model end def index? @current_user.admin? end def show? @current_user.admin? or @current_user == @user end end
Version data entries
18 entries across 18 versions & 1 rubygems