mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
Initial release of Discourse
This commit is contained in:
13
lib/tasks/user_actions.rake
Normal file
13
lib/tasks/user_actions.rake
Normal file
@ -0,0 +1,13 @@
|
||||
desc "rebuild the user_actions table"
|
||||
task "user_actions:rebuild" => :environment do
|
||||
o = UserActionObserver.send :new
|
||||
MessageBus.off
|
||||
UserAction.delete_all
|
||||
PostAction.all.each{|i| o.after_save(i)}
|
||||
Topic.all.each {|i| o.after_save(i)}
|
||||
Post.all.each {|i| o.after_save(i)}
|
||||
Notification.all.each {|i| o.after_save(i)}
|
||||
# not really needed but who knows
|
||||
MessageBus.on
|
||||
end
|
||||
|
Reference in New Issue
Block a user