File tree Expand file tree Collapse file tree 7 files changed +15
-15
lines changed
app/controllers/discourse_anon_usernames
lib/discourse_anon_usernames Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1- # ** Plugin Name ** Plugin
1+ # ** Discourse Anon Usernames ** Plugin
22
33** Plugin Summary**
44
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- module ::MyPluginModule
3+ module ::DiscourseAnonUsernames
44 class ExamplesController < ::ApplicationController
55 requires_plugin PLUGIN_NAME
66
Original file line number Diff line number Diff line change 33 admin :
44 site_settings :
55 categories :
6- TODO_plugin_name : " Plugin Name "
6+ discourse_anon_usernames : " Discourse Anon Usernames "
77 js :
8- discourse_plugin_name :
8+ discourse_anon_usernames :
99 placeholder : placeholder
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- MyPluginModule ::Engine . routes . draw do
3+ DiscourseAnonUsernames ::Engine . routes . draw do
44 get "/examples" => "examples#index"
55 # define routes here
66end
77
8- Discourse ::Application . routes . draw { mount ::MyPluginModule ::Engine , at : "my-plugin " }
8+ Discourse ::Application . routes . draw { mount ::DiscourseAnonUsernames ::Engine , at : "discourse-anon-usernames " }
Original file line number Diff line number Diff line change 1- TODO_plugin_name :
2- plugin_name_enabled :
1+ discourse_anon_usernames :
2+ discourse_anon_usernames_enabled :
33 default : false
44 client : true
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- module ::MyPluginModule
3+ module ::DiscourseAnonUsernames
44 class Engine < ::Rails ::Engine
55 engine_name PLUGIN_NAME
6- isolate_namespace MyPluginModule
6+ isolate_namespace DiscourseAnonUsernames
77 config . autoload_paths << File . join ( config . root , "lib" )
88 scheduled_job_dir = "#{ config . root } /app/jobs/scheduled"
99 config . to_prepare do
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- # name: discourse-plugin-name
3+ # name: discourse-anon-usernames
44# about: TODO
55# meta_topic_id: TODO
66# version: 0.0.1
77# authors: Discourse
88# url: TODO
99# required_version: 2.7.0
1010
11- enabled_site_setting :plugin_name_enabled
11+ enabled_site_setting :discourse_anon_usernames_enabled
1212
13- module ::MyPluginModule
14- PLUGIN_NAME = "discourse-plugin-name "
13+ module ::DiscourseAnonUsernames
14+ PLUGIN_NAME = "discourse-anon-usernames "
1515end
1616
17- require_relative "lib/my_plugin_module /engine"
17+ require_relative "lib/discourse_anon_usernames /engine"
1818
1919after_initialize do
2020 # Code which should run after Rails has finished booting
You can’t perform that action at this time.
0 commit comments