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

Version Path
social_stream-base-0.6.3 app/controllers/relation/customs_controller.rb
social_stream-base-0.6.2 app/controllers/relation/customs_controller.rb
social_stream-base-0.6.1 app/controllers/relation/customs_controller.rb
social_stream-base-0.6.0 app/controllers/relation/customs_controller.rb
social_stream-base-0.5.2 app/controllers/relation/customs_controller.rb
social_stream-base-0.5.1 app/controllers/relation/customs_controller.rb
social_stream-base-0.5.0 app/controllers/relation/customs_controller.rb
social_stream-0.4.6 app/controllers/relation/customs_controller.rb