Skip to content

Commit

Permalink
Merge pull request #210 from maboelnour/patch-1
Browse files Browse the repository at this point in the history
Document adding Wisper.clear to prevent of adding multiple listeners in case of  development env
  • Loading branch information
krisleech authored May 23, 2024
2 parents 973a1b1 + a453e44 commit 0fb1e4d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ In a Rails app you might want to add your global listeners in an initializer lik
```ruby
# config/initializers/listeners.rb
Rails.application.reloader.to_prepare do
Wisper.clear if Rails.env.development?

Wisper.subscribe(MyListener.new)
end
```
Expand Down

0 comments on commit 0fb1e4d

Please sign in to comment.