Rake task to change design_ids
This commit is contained in:
parent
039e837fff
commit
33e3821e61
|
@ -0,0 +1,11 @@
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
namespace :designs do
|
||||||
|
task :change_to, [:design_id] => [:environment] do |t, args|
|
||||||
|
# design = Design.find(args[:design_id])
|
||||||
|
Page.all.each do |page|
|
||||||
|
page.update_attribute('design_id', args[:design_id])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in New Issue