Sha256: 0cd2976fadd5d9d7f872468b4ae51e9e24b3b87ba23f7616d3a0da18b1bf4006

Contents?: true

Size: 448 Bytes

Versions: 1

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true
class DummyModel < ActiveRecord::Base
  include Apress::Api::Callbacks::Integration

  notify_services event: 'some_event',
                  params: [:name],
                  at: [:after_save, if: :name_empty?]

  notify_services event: 'dynamic_params_event',
                  params: ->(model) { {name: model.name + " stuff"} },
                  at: [:before_update]

  def name_empty?
    name.blank?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apress-api-1.24.2 spec/internal/app/models/dummy_model.rb