all_public scope in Post for clarity
This commit is contained in:
parent
4b0c45d895
commit
293afd80ff
2 changed files with 3 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ class TagsController < ApplicationController
|
|||
)
|
||||
)).select('DISTINCT posts.*')
|
||||
else
|
||||
@posts = StatusMessage.where(:public => true, :pending => false)
|
||||
@posts = StatusMessage.all_public
|
||||
end
|
||||
|
||||
@posts = @posts.tagged_with(params[:name])
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class Post < ActiveRecord::Base
|
|||
|
||||
validates :guid, :uniqueness => true
|
||||
|
||||
scope :all_public, where(:public => true, :pending => false)
|
||||
|
||||
def diaspora_handle
|
||||
read_attribute(:diaspora_handle) || self.author.diaspora_handle
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue