Only show searchable people in postscontroller

This commit is contained in:
danielgrippi 2011-03-15 16:22:17 -07:00
parent 8c7ad9a0a3
commit 9115a8f1f5

View file

@ -22,7 +22,7 @@ class PostsController < ApplicationController
@posts = @posts.tagged_with(params[:tag])
@posts = @posts.includes(:comments, :photos).paginate(:page => params[:page], :per_page => 15, :order => 'created_at DESC')
profiles = Profile.tagged_with(params[:tag]).select('profiles.id')
profiles = Profile.tagged_with(params[:tag]).where(:searchable => true).select('profiles.id')
@people = Person.where(:id => profiles.map{|p| p.id}).limit(15)
@fakes = PostsFake.new(@posts)