DG IZ stream for the current user's posts
This commit is contained in:
parent
2982a56774
commit
fc7f59bdfc
2 changed files with 2 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ class GroupsController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
||||||
def index
|
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
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
= current_user.profile.first_name
|
= current_user.profile.first_name
|
||||||
|
|
||||||
= render "shared/publisher"
|
= render "shared/publisher"
|
||||||
|
|
||||||
%ul#stream
|
%ul#stream
|
||||||
- for post in @posts
|
- for post in @posts
|
||||||
= render type_partial(post), :post => post
|
= render type_partial(post), :post => post
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue