Skip to content

Commit

Permalink
Prep some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspth committed Dec 10, 2024
1 parent 18e6f2e commit d1e3a5b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ You can see real life examples in these blog posts:
If your team is using Associated Objects, we're more than happy to feature any write ups here.
### Setting up an `ApplicationRecord::AssociatedObject`
In case you need to define default logic exclusive to your Associated Objects you can set up a common base class in `app/models/application_record/associated_object.rb`.
```ruby
class ApplicationRecord::AssociatedObject < ActiveRecord::AssociatedObject
end
```
We'll set this up when you run the generator below too.
### Use the generator to help write Associated Objects
To set up the `Post::Publisher` from above, you can call `bin/rails generate associated Post::Publisher`.
Expand Down

0 comments on commit d1e3a5b

Please sign in to comment.