mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Client and Server side routes for a Group
This commit is contained in:
parent
cef2d8dc82
commit
a873f7a95a
4 changed files with 17 additions and 0 deletions
|
@ -64,6 +64,8 @@ Discourse.Route.buildRoutes(function() {
|
|||
this.route(homepage, { path: '/' });
|
||||
});
|
||||
|
||||
this.resource('group', { path: '/groups/:groupname' });
|
||||
|
||||
// User routes
|
||||
this.resource('user', { path: '/users/:username' }, function() {
|
||||
this.resource('userActivity', { path: '/activity' }, function() {
|
||||
|
|
7
app/assets/javascripts/discourse/routes/group_route.js
Normal file
7
app/assets/javascripts/discourse/routes/group_route.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
Discourse.GroupRoute = Discourse.Route.extend({
|
||||
|
||||
model: function() {
|
||||
console.log('load it');
|
||||
}
|
||||
|
||||
});
|
6
app/controllers/groups_controller.rb
Normal file
6
app/controllers/groups_controller.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class GroupsController < ApplicationController
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
end
|
|
@ -163,6 +163,8 @@ Discourse::Application.routes.draw do
|
|||
get "posts/by_number/:topic_id/:post_number" => "posts#by_number"
|
||||
get "posts/:id/reply-history" => "posts#reply_history"
|
||||
|
||||
resources :groups
|
||||
|
||||
resources :posts do
|
||||
put "bookmark"
|
||||
get "replies"
|
||||
|
|
Loading…
Reference in a new issue