Sha256: ad419bda9611df317402e579e3ebcfa558883ba3a5d42b2fe800be2c85ba738b
Contents?: true
Size: 510 Bytes
Versions: 30
Compression:
Stored size: 510 Bytes
Contents
module Rostra class Ability include CanCan::Ability def initialize(user) @user = user || User.new if @user.can_participate_in_rostra? can :manage, Question, :user => user can :manage, Answer, :user => user can :manage, Comment, :user => user can [:vote, :toggle_following], Question cannot :vote, Question, :user => user can [:vote], Answer cannot :vote, Answer, :user => user end can :read, :all end end end
Version data entries
30 entries across 30 versions & 1 rubygems