Sha256: b39a84c66d99be70c931d920738b88a55d410419c9ba8bea8d2c787e100203ce

Contents?: true

Size: 470 Bytes

Versions: 24

Compression:

Stored size: 470 Bytes

Contents

require_dependency 'flexite/action_service'

module Flexite
  class Entry
    class DestroyService < ActionService
      def call
        @record = Entry.destroy(@form.id)
        success
      end

      protected

      def failure
        Result.new(success: false, endpoint: { status: 400 })
      end

      def success
        Result.new(flash: { type: :success, message: 'Entry was deleted!' }, data: { parent_id: @record.parent_id })
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
flexite-0.0.25 app/services/flexite/entry/destroy_service.rb
flexite-0.0.24 app/services/flexite/entry/destroy_service.rb
flexite-0.0.23 app/services/flexite/entry/destroy_service.rb
flexite-0.0.22 app/services/flexite/entry/destroy_service.rb
flexite-0.0.21 app/services/flexite/entry/destroy_service.rb
flexite-0.0.20 app/services/flexite/entry/destroy_service.rb
flexite-0.0.19 app/services/flexite/entry/destroy_service.rb
flexite-0.0.18 app/services/flexite/entry/destroy_service.rb
flexite-0.0.17 app/services/flexite/entry/destroy_service.rb
flexite-0.0.16 app/services/flexite/entry/destroy_service.rb
flexite-0.0.15 app/services/flexite/entry/destroy_service.rb
flexite-0.0.14 app/services/flexite/entry/destroy_service.rb
flexite-0.0.13 app/services/flexite/entry/destroy_service.rb
flexite-0.0.12 app/services/flexite/entry/destroy_service.rb
flexite-0.0.11 app/services/flexite/entry/destroy_service.rb
flexite-0.0.10 app/services/flexite/entry/destroy_service.rb
flexite-0.0.9 app/services/flexite/entry/destroy_service.rb
flexite-0.0.8 app/services/flexite/entry/destroy_service.rb
flexite-0.0.7 app/services/flexite/entry/destroy_service.rb
flexite-0.0.6 app/services/flexite/entry/destroy_service.rb