Skip to content

Commit

Permalink
Finish the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspth committed Dec 18, 2023
1 parent 2fe25b9 commit e9738a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ So `has_object` can state this and forward those callbacks onto the Associated O
```ruby
class Post < ActiveRecord::Base
# Passing `true`
has_object :publisher, after_create_commit: :publish,
after_touch: true, before_destroy: :prevent_errant_post_destroy
# Passing `true` forwards the same name, e.g. `after_touch`.
has_object :publisher, after_touch: true, after_create_commit: :publish,
before_destroy: :prevent_errant_post_destroy

# The above is the same as writing:
after_create_commit { publisher.publish }
Expand Down

0 comments on commit e9738a4

Please sign in to comment.