Merged
Conversation
Added: Flow#dup_for method for deep-copying flows to subclasses
Subclasses now transparently inherit parent flows without needing to redeclare them. The class-level flows method walks the ancestor chain, and instance-level flows aliases the child model_key to the parent's flow data. Changed: Subclasses of Circulator classes inherit parent flows Version: major
Subclasses that try to declare a flow for the same attribute as a parent class now get a clear error recommending Circulator.extension. Added: Error on redeclaring inherited flow attributes in subclasses
Circulator.extension on a subclass now deep-copies the parent's flow before merging, keeping parent and sibling flows isolated. Added: Extension support for subclasses that inherit parent flows
Extensions registered before a subclass exists are now applied lazily when the subclass's flows are first accessed. Flow methods look up transitions dynamically so that early extensions that modify existing transitions take effect on the first call. Added: Lazy application of pending extensions via inherited hook Changed: Flow methods use dynamic transition lookup for inherited flows
506149c to
2ed2787
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flowon a subclass for an attribute already defined on a parent raisesArgumentErrorrecommendingCirculator.extensionCirculator.extension(ChildClass, :attribute)copies the parent flow, applies the extension, and stores it on the child class without affecting the parentinheritedhookTest plan
🤖 Generated with Claude Code