MS IZ fixed a couple of view things as well as the dev db seed script
This commit is contained in:
parent
890f927492
commit
7be374ac48
3 changed files with 8 additions and 4 deletions
|
|
@ -2,14 +2,15 @@ class PeopleController < ApplicationController
|
|||
before_filter :authenticate_user!
|
||||
|
||||
def index
|
||||
@people = Person.friends.paginate :page => params[:page], :order => 'created_at DESC'
|
||||
@people = current_user.friends.paginate :page => params[:page], :order => 'created_at DESC'
|
||||
end
|
||||
|
||||
def show
|
||||
@person= Person.where(:id => params[:id]).first
|
||||
|
||||
@person_profile = @person.profile
|
||||
@person_posts = Post.where(:person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC'
|
||||
@latest_status_message = StatusMessage.newest(@person)
|
||||
@latest_status_message = StatusMessage.newest_for(@person)
|
||||
@post_count = @person_posts.count
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def link_to_person(person)
|
||||
def link_to_person(user)
|
||||
person = user.person
|
||||
puts person.inspect
|
||||
link_to person.real_name, person_path(person)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
require 'config/environment'
|
||||
|
||||
# Create seed user
|
||||
user = User.create( :password => "evankorth",
|
||||
user = User.create( :email => "robert@joindiaspora.com",
|
||||
:password => "evankorth",
|
||||
:person => Person.create(
|
||||
:email => "robert@joindiaspora.com",
|
||||
:url => "http://localhost:3000/",
|
||||
|
|
|
|||
Loading…
Reference in a new issue