Skip to content

Rails README updates #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025
Merged

Rails README updates #269

merged 3 commits into from
May 20, 2025

Conversation

cretz
Copy link
Member

@cretz cretz commented May 14, 2025

What was changed

  • Cleaned up the ActiveModel support snippet
  • Clarified in README that ORM models shouldn't be reused
  • Clarified in README issues with Rails lazy loading

Checklist

  1. Closes [Feature Request] Clarify in README issue with lazy loading during rails when testing workflows #267

@cretz cretz requested a review from a team as a code owner May 14, 2025 20:12
Comment on lines +1156 to +1161
For ActiveRecord, or other general/ORM models that are used for a different purpose, it is not recommended to
try to reuse them as Temporal models. Eventually model purposes diverge and models for a Temporal workflows/activities
should be specific to their use for clarity and compatibility reasons. Also many Ruby ORMs do many lazy things and
therefore provide unclear serialization semantics. Instead, consider having models specific for workflows/activities and
translate to/from existing models as needed. See the [ActiveModel](#activemodel) section on how to do this with
ActiveModel objects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a copy of what's above? Does it need to be in both spots?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally put in both spots because I know some looking at data conversion may not look at rails and vice versa. Hopefully there's a future where docs.temporal.io obviates all of this.

@cretz cretz force-pushed the rails-readme-updates branch from 8a6eb65 to e906df7 Compare May 19, 2025 23:46
@cretz cretz force-pushed the rails-readme-updates branch from e906df7 to 29036a2 Compare May 19, 2025 23:59
@cretz cretz merged commit 64deb42 into temporalio:main May 20, 2025
7 checks passed
@cretz cretz deleted the rails-readme-updates branch May 20, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Clarify in README issue with lazy loading during rails when testing workflows
2 participants