Skip to content

Commit 11f56dd

Browse files
committed
Switch from lists to headings.
1 parent 3885aeb commit 11f56dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

posts/2025-09-12-evolving-event-names-and-payloads-in-rails-event-store-without-breaking-history.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ We decided to create a custom `Transformations::RefundToReturnEventMapper`and in
6666

6767
### Key components
6868

69-
1. Event class name transformation
69+
#### Event class name transformation
7070

7171
```ruby
7272
class_map = {
@@ -111,7 +111,7 @@ module Transformations
111111
end
112112
```
113113

114-
2. Payload data transformation
114+
#### Payload data transformation
115115

116116
As you probably notice there's also a call to `transform_payload`, here's how it works:
117117

@@ -159,7 +159,7 @@ As described in [this post](https://blog.arkency.com/4-strategies-when-you-need-
159159

160160
After investigating its capabilities, we discovered that upcast can indeed handle both event class name changes and payload transformation through lambda functions. However, we chose to stick with our custom mapper approach for several practical reasons:
161161

162-
1. Pipeline integration complexity
162+
### Pipeline integration complexity
163163

164164
RES upcast works beautifully as a standalone solution, but doesn't integrate cleanly with the transformation pipeline we needed:
165165

@@ -176,7 +176,7 @@ RES upcast works beautifully as a standalone solution, but doesn't integrate cle
176176

177177
We needed `DomainEvent.new`, `SymbolizeMetadataKeys.new`, and `PreserveTypes.new` transformations, but upcast's `Default` mapper isn't designed to work within a transformation pipeline.
178178

179-
2. Excessive boilerplate when using lambdas
179+
### Excessive boilerplate when using lambdas
180180

181181
Lambdas could be used to handle paload transformation, however using upcast with lambdas required significant boilerplate code for each event type:
182182

@@ -205,7 +205,7 @@ Without the transformation pipeline, we'd lose the automatic benefits of:
205205

206206
We'd need to reimplement these features manually in each lambda.
207207

208-
3. Code organization and maintainability
208+
### Code organization and maintainability
209209

210210
Our custom mapper provides better separation of concerns:
211211
- single responsibility: one class handles all transformation logic

0 commit comments

Comments
 (0)