mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Admin contact statuses management #2477
This commit is contained in:
parent
1f85cec9ac
commit
601592aed1
23 changed files with 335 additions and 190 deletions
15
db/data/20150707103801_refactor_contact_statuses.rb
Normal file
15
db/data/20150707103801_refactor_contact_statuses.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class RefactorContactStatuses < ActiveRecord::Migration
|
||||
def self.up
|
||||
Contact.find_each do |contact|
|
||||
statuses = []
|
||||
contact.depricated_statuses.each do |ds|
|
||||
statuses << ds.value
|
||||
end
|
||||
contact.update_column('statuses', statuses)
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue