Sha256: e6975563803218a08198552691c95426ea818d9597cd4851020441df338d98ae

Contents?: true

Size: 388 Bytes

Versions: 3

Compression:

Stored size: 388 Bytes

Contents

module RailsBlogEngine
  module Ability
    def can_read_blog
      can :read, RailsBlogEngine::Post
      can [:read, :create], RailsBlogEngine::Comment
    end

    def can_manage_blog
      alias_action :mark_as_spam, :to => :update
      alias_action :mark_as_ham, :to => :update

      can :manage, RailsBlogEngine::Post
      can :update, RailsBlogEngine::Comment
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_blog_engine-0.0.3 lib/rails_blog_engine/ability.rb
rails_blog_engine-0.0.2 lib/rails_blog_engine/ability.rb
rails_blog_engine-0.0.1 lib/rails_blog_engine/ability.rb