I’ve got a site with 750+ categories and need to change the text in the “About this category” post to "Blah. Category Name. Blah’.
I’ve tried doing something like this:
desc='Blah. %s Blah.' c = Category.where("name like '%whatever%'").first p = Post.where(topic_id: c.topic_id).first t = Topic.find(c.topic_id) p.raw = desc % c.name p.cooked=p.cook(p.raw) p.save
but it doesn’t change the text in the post, much less the excerpt for the topic or the category description.
What am I missing?