Sha256: 43d32da6bbf01e244d163f34f071c72249a3290f04d08b4d186275f9c5321f5e
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
class DummiesController < ActionController::Base before_filter(only: :test) do @dummies = Dummy.restrict!('test') end load_and_authorize_resource def index render nothing: true end def show render nothing: true end def create render nothing: true end def edit render nothing: true end def update render nothing: true end def destroy render nothing: true end def test render nothing: true end protected def current_user 'user' end def current_ability ability = params[:protector] ? ProtectorAbility : DefaultAbility @current_ability ||= ability.new(current_user) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
protector-cancan-0.1.1 | spec/internal/app/controllers/dummies_controller.rb |
protector-cancan-0.1.0 | spec/internal/app/controllers/dummies_controller.rb |