From fc7f59bdfc70599d814135f5fc9488dba1ff060e Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 17 Aug 2010 10:13:15 -0700 Subject: [PATCH] DG IZ stream for the current user's posts --- app/controllers/groups_controller.rb | 2 +- app/views/groups/index.html.haml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index f3da1ec8a..b3e826077 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -2,7 +2,7 @@ class GroupsController < ApplicationController before_filter :authenticate_user! def index - @posts = Post.paginate :page => params[:page], :order => 'created_at DESC' + @posts = current_user.posts.paginate :page => params[:page], :order => 'created_at DESC' end def create diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml index b3b4d2acb..e4d1ecca2 100644 --- a/app/views/groups/index.html.haml +++ b/app/views/groups/index.html.haml @@ -3,6 +3,7 @@ = current_user.profile.first_name = render "shared/publisher" + %ul#stream - for post in @posts = render type_partial(post), :post => post