Sha256: f8fc13862f193a744b7de500aa8d76baf3f4d797a725efbc97db7070bfca8a98

Contents?: true

Size: 603 Bytes

Versions: 13

Compression:

Stored size: 603 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/array/wrap"

module ActiveResource
  module Callbacks
    extend ActiveSupport::Concern

    CALLBACKS = [
      :before_validation, :after_validation, :before_save, :around_save, :after_save,
      :before_create, :around_create, :after_create, :before_update, :around_update,
      :after_update, :before_destroy, :around_destroy, :after_destroy
    ]

    included do
      extend ActiveModel::Callbacks
      include ActiveModel::Validations::Callbacks

      define_model_callbacks :save, :create, :update, :destroy
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
activeresource-6.1.4 lib/active_resource/callbacks.rb
activeresource-6.1.3 lib/active_resource/callbacks.rb
activeresource-6.1.2 lib/active_resource/callbacks.rb
activeresource-6.1.1 lib/active_resource/callbacks.rb
activeresource-6.1.0 lib/active_resource/callbacks.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/activeresource-5.1.1/lib/active_resource/callbacks.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/activeresource-5.1.1/lib/active_resource/callbacks.rb
activeresource-6.0.0 lib/active_resource/callbacks.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/activeresource-5.1.1/lib/active_resource/callbacks.rb
activeresource-5.1.1 lib/active_resource/callbacks.rb
ric-0.13.0 vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/callbacks.rb
ric-0.12.2 vendor/bundle/ruby/2.5.0/gems/activeresource-5.1.0/lib/active_resource/callbacks.rb
activeresource-5.1.0 lib/active_resource/callbacks.rb