Skip to content

Commit 3c70691

Browse files
authored
Merge pull request #514 from gocardless/fix-reloading-cache
Fix reloading state machine caches
2 parents 455a21d + 5701e31 commit 3c70691

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ Metrics/CyclomaticComplexity:
1515

1616
Metrics/PerceivedComplexity:
1717
Max: 11
18+
19+
Gemspec/DevelopmentDependencies:
20+
Enabled: false

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v10.2.3 2nd Aug 2023
2+
3+
### Changed
4+
- Fixed calls to reloading internal cache is the state_machine was made private / protected
5+
16
## v10.2.2 21st April 2023
27

38
### Changed

lib/generators/statesman/generator_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def model_file_name
1111
end
1212

1313
def migration_class_name
14-
klass.gsub(/::/, "").pluralize
14+
klass.gsub("::", "").pluralize
1515
end
1616

1717
def next_migration_number

lib/statesman/adapters/active_record_queries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def included(base)
5353
define_method(:reload) do |*a|
5454
instance = super(*a)
5555
if instance.respond_to?(:state_machine, true)
56-
instance.state_machine.reset
56+
instance.send(:state_machine).reset
5757
end
5858
instance
5959
end

lib/statesman/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Statesman
4-
VERSION = "10.2.2"
4+
VERSION = "10.2.3"
55
end

0 commit comments

Comments
 (0)