Skip to content

Commit

Permalink
Mention Kredis integration again; it got lost in #15
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspth committed Dec 22, 2023
1 parent 628c755 commit 97cb38f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,19 @@ end
See [the `ActiveJob::Performs` README](https://github.com/kaspth/active_job-performs) for more details.
### Automatic Kredis integration
We've got automatic Kredis integration for Associated Objects, so you can use any `kredis_*` type just like in Active Record classes:
```ruby
class Post::Publisher < ActiveRecord::AssociatedObject
kredis_datetime :publish_at # Uses a namespaced "post:publishers:<post_id>:publish_at" key.
end
```
> [!INFO]
> Under the hood, this reuses the same info we needed for automatic Active Job support. Namely, the Active Record class, here `Post`, and its `id`.
### Namespaced models
If you have a namespaced Active Record like this:
Expand Down

0 comments on commit 97cb38f

Please sign in to comment.