Sha256: 0a54c8474d947fb3a631c5524a1614e556c9b126f3efc39c0de200af62a78665
Contents?: true
Size: 626 Bytes
Versions: 10
Compression:
Stored size: 626 Bytes
Contents
module Faalis::Dashboard::Sections module ResourceDestroy extend ActiveSupport::Concern # The actual action method of a dashboard controller def destroy @resource = model.find(params[:id]) authorize @resource @resource_title = t(_resource_title.singularize) before_destroy_hook(@resource) @resource.destroy return if _override_views.include? :destroy render 'faalis/dashboard/resource/destroy' end private # You can override this method to change the behaviour of `destroy` # action def before_destroy_hook(resource) end end end
Version data entries
10 entries across 10 versions & 1 rubygems