Client and Server side routes for a Group

This commit is contained in:
Robin Ward 2014-01-30 17:10:36 -05:00
parent cef2d8dc82
commit a873f7a95a
4 changed files with 17 additions and 0 deletions

View File

@ -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() {

View File

@ -0,0 +1,7 @@
Discourse.GroupRoute = Discourse.Route.extend({
model: function() {
console.log('load it');
}
});

View File

@ -0,0 +1,6 @@
class GroupsController < ApplicationController
def show
end
end

View File

@ -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"