app/controllers/spotlight/attachments_controller.rb in blacklight-spotlight-0.1.0 vs app/controllers/spotlight/attachments_controller.rb in blacklight-spotlight-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
module Spotlight
class AttachmentsController < ApplicationController
before_filter :authenticate_user!
- load_resource :exhibit, class: "Spotlight::Exhibit"
+ load_and_authorize_resource :exhibit, class: "Spotlight::Exhibit"
load_and_authorize_resource through: :exhibit
# POST /attachments
def create
@attachment.attributes = attachment_params