I’m working on a plugin that will be a front end for my Ansible Discourse management playbooks. Right now, this plugin is on its way to being a decent example of how to
- add a model to Discourse
- add some routes
- create/modify stuff in the added model (this is where I"m stuck right now).
It should soon also have code that will allow it to be used as a github app. I might at some point feel the need to move the end result to a private repo, but I might not. I would like to provide sample code that adds a model and supports github actions (or app, I get them confused).
This makes a button show up!
this does not seem to make the button do anything
Adding a server model in rails
- https://github.com/pfaffman/discourse-pfaffmanager/blob/master/app/models/pfaffmanager/server.rb
- https://github.com/pfaffman/discourse-pfaffmanager/blob/master/db/migrate/20200629123401_create_pfaffmanager_server.rb
You can create a server with Pfaffmanager::Server.create(hostname: 'simple.myforum.us")