Sha256: 5cc41e7080be49ca11e32043e87190f151c350ddcb6aea17d69718ea6b11341e

Contents?: true

Size: 360 Bytes

Versions: 23

Compression:

Stored size: 360 Bytes

Contents

class AdminAssistant
  module Request
    class Destroy < Base
      def call
        @record = model_class.find @controller.params[:id]
        if @admin_assistant.custom_destroy
          @admin_assistant.custom_destroy.call @record
        else
          @record.destroy
        end
        @controller.send :render, :text => ''
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
admin_assistant-2.4.0 lib/admin_assistant/request/destroy.rb
admin_assistant-2.3.2 lib/admin_assistant/request/destroy.rb
admin_assistant-2.3.1 lib/admin_assistant/request/destroy.rb
admin_assistant-2.3.0 lib/admin_assistant/request/destroy.rb
admin_assistant-1.0.4 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.8 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.7 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.6 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.5 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.4 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.3 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.2 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.1 lib/admin_assistant/request/destroy.rb
admin_assistant-2.2.0 lib/admin_assistant/request/destroy.rb
admin_assistant-2.1.1 lib/admin_assistant/request/destroy.rb
admin_assistant-2.1.0 lib/admin_assistant/request/destroy.rb
admin_assistant-2.0.1 lib/admin_assistant/request/destroy.rb
admin_assistant-2.0.0 lib/admin_assistant/request/destroy.rb
admin_assistant-2.0.0.pre2 lib/admin_assistant/request/destroy.rb
admin_assistant-2.0.0.pre1 lib/admin_assistant/request/destroy.rb