Client and Server side routes for a Group
This commit is contained in:
parent
cef2d8dc82
commit
a873f7a95a
|
@ -64,6 +64,8 @@ Discourse.Route.buildRoutes(function() {
|
||||||
this.route(homepage, { path: '/' });
|
this.route(homepage, { path: '/' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.resource('group', { path: '/groups/:groupname' });
|
||||||
|
|
||||||
// User routes
|
// User routes
|
||||||
this.resource('user', { path: '/users/:username' }, function() {
|
this.resource('user', { path: '/users/:username' }, function() {
|
||||||
this.resource('userActivity', { path: '/activity' }, function() {
|
this.resource('userActivity', { path: '/activity' }, function() {
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
Discourse.GroupRoute = Discourse.Route.extend({
|
||||||
|
|
||||||
|
model: function() {
|
||||||
|
console.log('load it');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
|
@ -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/by_number/:topic_id/:post_number" => "posts#by_number"
|
||||||
get "posts/:id/reply-history" => "posts#reply_history"
|
get "posts/:id/reply-history" => "posts#reply_history"
|
||||||
|
|
||||||
|
resources :groups
|
||||||
|
|
||||||
resources :posts do
|
resources :posts do
|
||||||
put "bookmark"
|
put "bookmark"
|
||||||
get "replies"
|
get "replies"
|
||||||
|
|
Loading…
Reference in New Issue