Sha256: 500feb5a09f7665af35f179a01609eb27b1bd2f27d6463d89cccdf9342a87a07
Contents?: true
Size: 638 Bytes
Versions: 76
Compression:
Stored size: 638 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # CRUD actions for exhibit contact emails class ContactEmailController < Spotlight::ApplicationController rescue_from ActiveRecord::RecordNotFound, with: :record_not_found before_action :authenticate_user! load_and_authorize_resource :exhibit, class: 'Spotlight::Exhibit' load_and_authorize_resource through: :exhibit def destroy @contact_email.destroy render json: { success: true, error: nil } end private def record_not_found(_error) render json: { success: false, error: 'Not Found' }, status: :not_found end end end
Version data entries
76 entries across 76 versions & 1 rubygems