Sha256: 6da22d98cf06d849f00fb3cab4b8db8714b0e38cef664577c6ea43dc262480a2

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

module FileRecord
  module Callbacks
    extend ActiveSupport::Concern
    included do
      extend ActiveModel::Callbacks
      include ActiveModel::Validations::Callbacks

      define_model_callbacks :save, :destroy
    end 


    def save
      run_callbacks(:save) { super }
    end

    def destroy
      run_callbacks(:destroy) { super }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
file_record-0.1.0 lib/file_record/callbacks.rb