Add aasm_state to procedures
This commit is contained in:
parent
a8e7038ab5
commit
2b8ee92074
4 changed files with 18 additions and 4 deletions
8
lib/tasks/2018_05_15_add_aasm_state_to_procedure.rake
Normal file
8
lib/tasks/2018_05_15_add_aasm_state_to_procedure.rake
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace :'2018_05_15_add_aasm_state_to_procedure' do
|
||||
task set: :environment do
|
||||
Procedure.archivees.update_all(aasm_state: :archivee)
|
||||
Procedure.publiees.update_all(aasm_state: :publiee)
|
||||
Procedure.brouillons.update_all(aasm_state: :brouillon)
|
||||
Procedure.unscoped.where.not(hidden_at: nil).update_all(aasm_state: :hidden)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue