I need to create a discourse user group with my plugin. I used the below code and its not working. Any idea why its not working ? Thankyou
default_group = Group.new(
name: 'Dumy',
visibility_level: Group.visibility_levels[:public],
primary_group: true,
title: 'Dumy',
flair_url: 'https://dumy.com/public/images/oc-logo-icon.svg',
bio_raw: 'Dumy wording.',
full_name: 'dummy'
)
default_group.save!
I referred to the code used in patreon plugin