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"
|
desc 'Remove duplicated bulletins (announcements) created by preview'
|
||||||
# task :bulletin do
|
|
||||||
# # Task goes here
|
namespace :bulletin do
|
||||||
# end
|
task :remove_preview_bulletins do
|
||||||
|
bulletins = Bulletin.where(is_preview: true)
|
||||||
|
bulletins.destroy_all
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue