mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-09 13:42:17 +00:00
controller, helper and routes
This commit is contained in:
parent
f6c9977c7a
commit
df810c3613
7
app/controllers/choice/application_controller.rb
Normal file
7
app/controllers/choice/application_controller.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
require_dependency 'discourse'
|
||||||
|
|
||||||
|
module Choice
|
||||||
|
class ApplicationController < ActionController::Base
|
||||||
|
include CurrentUser
|
||||||
|
end
|
||||||
|
end
|
7
app/controllers/choice/choice_controller.rb
Normal file
7
app/controllers/choice/choice_controller.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module Choice
|
||||||
|
class ChoiceController < Choice::ApplicationController
|
||||||
|
def about
|
||||||
|
head 200
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
5
app/helpers/choice/application_helper.rb
Normal file
5
app/helpers/choice/application_helper.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
module Choice
|
||||||
|
module ApplicationHelper
|
||||||
|
end
|
||||||
|
end
|
3
config/routes.rb
Normal file
3
config/routes.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Choice::Engine.routes.draw do
|
||||||
|
get "about" => "choice#about"
|
||||||
|
end
|
15
plugin.rb
15
plugin.rb
@ -1,4 +1,17 @@
|
|||||||
# name: choice-plugin
|
# name: choice-plugin
|
||||||
# about: Integrating CHOICE with Discourse
|
# about: Integrating CHOICE with Discourse
|
||||||
# version: 0.0.1
|
# version: 0.0.2
|
||||||
# authors: Rimian Perkins
|
# authors: Rimian Perkins
|
||||||
|
|
||||||
|
module ::Choice
|
||||||
|
class Engine < ::Rails::Engine
|
||||||
|
engine_name 'choice'
|
||||||
|
isolate_namespace Choice
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
after_initialize do
|
||||||
|
Discourse::Application.routes.prepend do
|
||||||
|
mount ::Choice::Engine, at: '/choice'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user