Sha256: 5536608956df49cf622889a228d19f7847663ac5e96fe689c5c4f0e552ce6585
Contents?: true
Size: 442 Bytes
Versions: 8
Compression:
Stored size: 442 Bytes
Contents
class Relation::CustomsController < InheritedResources::Base before_filter :authenticate_user! load_and_authorize_resource :class => Relation::Custom respond_to :js belongs_to :sphere, :optional => true def index # Must authorize index, because Cancan does not filter collection with conditions. # See https://github.com/ryanb/cancan/wiki/checking-abilities authorize! :read, parent.customs.new index! end end
Version data entries
8 entries across 8 versions & 2 rubygems