Sha256: 35cddfa2a5e0f730fe58ed9599c9f0b41b84443176323b6c76bb4efe181c7bb2

Contents?: true

Size: 474 Bytes

Versions: 24

Compression:

Stored size: 474 Bytes

Contents

require_dependency 'flexite/action_service'

module Flexite
  class Entry
    class DestroyArrayEntryService < ActionService
      def call
        if @form.id.present?
          Entry.destroy(@form.id)
        end

        success
      end

      protected

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

      def success
        Result.new(flash: { type: :success, message: 'Entry was deleted!' })
      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_array_entry_service.rb
flexite-0.0.24 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.23 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.22 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.21 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.20 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.19 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.18 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.17 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.16 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.15 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.14 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.13 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.12 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.11 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.10 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.9 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.8 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.7 app/services/flexite/entry/destroy_array_entry_service.rb
flexite-0.0.6 app/services/flexite/entry/destroy_array_entry_service.rb