app/models/pseud.rb
# Gets the number of works by this user that the current user can see
Gets the number of works by this user that the current user can see
Gets the number of works by this user that the current user can see
def visible_works_count
    if User.current_user.nil?
      self.works.posted.unhidden.unrestricted.count
    else
      self.works.posted.unhidden.count
    end
  end
def visible_works_count if User . current_user . nil? self . works . posted . unhidden . unrestricted . count else self . works . posted . unhidden . count end end
Gets the number of works by this user that the current user can see
Gets the number of works by this user that the current user can see