Sha256: fa93c289749a0ac3c67b1059532257a70359e890006f31e9f1b715ba54a8ce78
Contents?: true
Size: 400 Bytes
Versions: 9
Compression:
Stored size: 400 Bytes
Contents
class ACLActionOverride < ApplicationController access_control :allowed?, :filter => false do allow all, :to => :index deny all, :to => :show allow :owner, :of => :foo, :to => :edit end def check_allow head allowed?(params[:_action]) ? :ok : :unauthorized end def check_allow_with_foo head allowed?(params[:_action], :foo => Foo.first) ? :ok : :unauthorized end end
Version data entries
9 entries across 9 versions & 1 rubygems