gitlab-org--gitlab-foss/app/controllers/public/projects_controller.rb

14 lines
507 B
Ruby
Raw Normal View History

2013-01-10 18:17:57 +00:00
class Public::ProjectsController < ApplicationController
skip_before_filter :authenticate_user!,
:reject_blocked, :set_current_user_for_observers,
:add_abilities
2013-01-10 18:17:57 +00:00
layout 'public'
def index
@projects = Project.public_or_internal_only(current_user)
@projects = @projects.search(params[:search]) if params[:search].present?
2013-01-13 15:24:29 +00:00
@projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
2013-01-10 18:17:57 +00:00
end
end