Uninstalling Babble Part 1: Removing chats you no longer need.

(UPDATED AGAIN - thanks @fzngagan)

In rails console (test in rails c --sandbox first), you could check this.

Topic.where('archetype = ?', 'chat').count
Topic.where('archetype = ?', 'chat').first
Topic.where('archetype = ?', 'chat').second
Topic.where('archetype = ?', 'chat').last

will establish you have some chats. Check results for sanity.

Then all you would have to do is:

Topic.where('archetype = ?', 'chat').count
Topic.where('archetype = ?', 'chat').find_each do |chat|
Topic.where('archetype = ?', 'chat').count

This should destroy all of the chats (be sure you don’t want to keep them!).

Once happy, exit sandbox and run in:

rails c

Let us know how you get on.

I’m also keen to uninstall cleanly. “all” succeeds but “count”, “first”, etc, do not.

Also, do you think removing the chats will remove the groups?

SNIPPED some errors

1 Like

Apologies, Mark, thanks for your patience - should have done this at desk, not on the go on my phone! - Couple of typos, updated above post.

Please exit console and start a fresh one and follow it through again.

Good point :+1:

We’ll need to embellish this Topic for that. This was to address the OP’s original issue for Topic Lists for now.

1 Like

I removed babble already and am now here trying to remove these messages. Is this still possible, without babble?When I run these commands I get this error:

irb(main):001:0> Topic.where('archetype = ?', Archetype.chat).count
Traceback (most recent call last):
        1: from (irb):1
NoMethodError (undefined method `chat' for Archetype:Class)
1 Like

You can replace Archetype.chat with 'chat'