Commit fa2713e7cd09559a44f39772559117dbd96c3eb9
1 parent
161785bd
Exists in
master
and in
28 other branches
plugin-spammable: reloading extension on each request on development mode
Showing
1 changed file
with
11 additions
and
9 deletions
Show diff stats
lib/noosfero/plugin/spammable.rb
1 | -Spammable.module_eval do | |
2 | - def marked_as_spam | |
3 | - plugins.dispatch(:marked_as_spam, self) | |
4 | - end | |
1 | +Rails.configuration.to_prepare do | |
2 | + Spammable.module_eval do | |
3 | + def marked_as_spam | |
4 | + plugins.dispatch(:marked_as_spam, self) | |
5 | + end | |
5 | 6 | |
6 | - def marked_as_ham | |
7 | - plugins.dispatch(:marked_as_ham, self) | |
8 | - end | |
7 | + def marked_as_ham | |
8 | + plugins.dispatch(:marked_as_ham, self) | |
9 | + end | |
9 | 10 | |
10 | - def check_for_spam | |
11 | - plugins.dispatch(:check_for_spam, self) | |
11 | + def check_for_spam | |
12 | + plugins.dispatch(:check_for_spam, self) | |
13 | + end | |
12 | 14 | end |
13 | 15 | end | ... | ... |