Topics.where(category_id: 123).each do |t|
posts.where(topic_id: t).each do |p|
p.raw.gsub!("replaceme","/")
p.save
end
end
./launcher enter app
rails c
# paste in the stuff
You might make a backup first.
Topics.where(category_id: 123).each do |t|
posts.where(topic_id: t).each do |p|
p.raw.gsub!("replaceme","/")
p.save
end
end
./launcher enter app
rails c
# paste in the stuff
You might make a backup first.