Task to delete settings for old version of default widget
This commit is contained in:
parent
e604c38eb4
commit
7105f103e1
|
@ -492,4 +492,10 @@ namespace :migrate do
|
||||||
pp.save
|
pp.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
task :clean_parts => :environment do
|
||||||
|
PagePart.where(widget_style: /\d/, kind: 'module_widget').each{|part| part.update_attributes({kind: 'text', widget_style: nil, widget_field: nil})}
|
||||||
|
PagePart.where(widget_style: /\d/).each{|part| part.update_attributes({widget_style: nil, widget_field: nil})}
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue