Ersetze einen String in allen Beiträgen

Good idea. Escaping things makes my head hurt.

I see your code above is easy enough. Something like this?

Topics.where(category_id: 123).each do |t|
  posts.where(topic_id: t).each do |p|
    p.raw.gsub("replaceme","/")
  end
end

Something like that? I assume the markdown / is better than using CR/LF or \n, or even
or whatever?

How does one run this from the shell? Just type in “rails” and then copy the code in there?