app/models/rostra/ability.rb in rostra-0.0.14 vs app/models/rostra/ability.rb in rostra-0.0.15

- old
+ new

@@ -1,19 +1,17 @@ module Rostra class Ability include CanCan::Ability - attr_reader :user - 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, Question + can [:vote, :toggle_following], Question cannot :vote, Question, :user => user can :vote, Answer cannot :vote, Answer, :user => user end \ No newline at end of file