Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Gem

on:
release:
types: [published]

jobs:
release:
permissions:
contents: write
id-token: write

environment: release

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- uses: rubygems/release-gem@v1
6 changes: 4 additions & 2 deletions lib/ar_transaction_changes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

module ArTransactionChanges
def self.included(base)
if !base._commit_callbacks.empty? || !base._rollback_callbacks.empty?
raise "ArTransactionChanges must be included before defining any after_commit or after_rollback callbacks"
if base.respond_to?(:_commit_callbacks) && base.respond_to?(:_rollback_callbacks)
if !base._commit_callbacks.empty? || !base._rollback_callbacks.empty?
raise "ArTransactionChanges must be included before defining any after_commit or after_rollback callbacks"
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ar_transaction_changes/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ArTransactionChanges
VERSION = "1.1.9"
VERSION = "1.1.10"
end