RubyGems Navigation menu

cant 0.2.0

include Cant ------------ class User; include Cant::Embeddable; end class AuthorizationMiddleware; include Cant::Embeddable; end declare rules ------------- User.cant do |action=:update, post| not post.user == self if Post === resource and action == :update end AuthorizationMiddleware.cant do |env| not env['user'] == env['post'].user if env.path =~ /^\posts/ and env.method == 'PUT' end verify ------ user.cant? :update, post user.die_if_cant! :update, post control ------- rescue_from Cant::AccessDenied do |error| flash[:error] = error.message redirect_to request.referer end

Gemfile:
= クリップボードにコピー コピー完了!

インストール:
=

バージョン履歴:

  1. 0.2.2 - January 14, 2011 (11.5KB)
  2. 0.2.1 - January 04, 2011 (11.5KB)
  3. 0.2.0 - January 03, 2011 (12KB)

Development依存関係 (2):

rspec >= 0
wrong >= 0

所有者:

作者:

  • thierry.henrio

SHA 256チェックサム:

4ac4289d1e7c58eed7e99fa50ef07e93b139067bcfadf70d348dfb1e39785382

累計ダウンロード数 13,712

このバージョンのみ 4,247

ライセンス:

N/A

必要なRubyのバージョン: なし

リンク: