I’m struggling with a script to rebake all posts since a specific date. Can someone help me out?
(Background info: we have changed some thumbnail settings for TLP, but I don’t want to rebake 4M posts - just the last month or so will be enough)
I’m struggling with a script to rebake all posts since a specific date. Can someone help me out?
(Background info: we have changed some thumbnail settings for TLP, but I don’t want to rebake 4M posts - just the last month or so will be enough)
Something like
Post.where("created_at > ?", Time.now - 1.day).each do |p|
p.rebake!
end
And then if that seems right, you’d change 1.day to 1.month, obviously…
Brilliant, thanks Jay!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.