Sha256: e5804bbd6d9cfe238814d619a4d54d5353cff4558038eb7ba708505d07fb5a2d
Contents?: true
Size: 634 Bytes
Versions: 1
Compression:
Stored size: 634 Bytes
Contents
module Underworld::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 'underworld/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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
underworld-1.0.0 | lib/underworld/dashboard/sections/resource_destroy.rb |