create rake task to remove preview bulletins
This commit is contained in:
parent
02e4df8b1f
commit
5382ccdd9e
|
@ -1,4 +1,8 @@
|
|||
# desc "Explaining what the task does"
|
||||
# task :bulletin do
|
||||
# # Task goes here
|
||||
# end
|
||||
desc 'Remove duplicated bulletins (announcements) created by preview'
|
||||
|
||||
namespace :bulletin do
|
||||
task :remove_preview_bulletins do
|
||||
bulletins = Bulletin.where(is_preview: true)
|
||||
bulletins.destroy_all
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue