BigW Consortium Gitlab

projects_controller.rb 503 Bytes
Newer Older
1 2
class Public::ProjectsController < ApplicationController
  skip_before_filter :authenticate_user!,
3 4
                     :reject_blocked, :set_current_user_for_observers,
                     :add_abilities
5 6 7 8

  layout 'public'

  def index
9
    @projects = Project.publicish(current_user)
10
    @projects = @projects.search(params[:search]) if params[:search].present?
11
    @projects = @projects.sort(@sort = params[:sort])
12
    @projects = @projects.includes(:namespace).page(params[:page]).per(20)
13 14
  end
end