2013-01-10 13:17:57 -05:00
|
|
|
class Public::ProjectsController < ApplicationController
|
|
|
|
skip_before_filter :authenticate_user!,
|
2013-09-20 11:39:12 -04:00
|
|
|
:reject_blocked, :set_current_user_for_observers,
|
|
|
|
:add_abilities
|
2013-01-10 13:17:57 -05:00
|
|
|
|
|
|
|
layout 'public'
|
|
|
|
|
|
|
|
def index
|
2014-02-13 15:45:51 -05:00
|
|
|
@projects = Project.publicish(current_user)
|
2013-05-13 14:18:08 -04:00
|
|
|
@projects = @projects.search(params[:search]) if params[:search].present?
|
2013-12-29 05:58:00 -05:00
|
|
|
@projects = @projects.sort(@sort = params[:sort])
|
2013-12-26 04:16:30 -05:00
|
|
|
@projects = @projects.includes(:namespace).page(params[:page]).per(20)
|
2013-01-10 13:17:57 -05:00
|
|
|
end
|
|
|
|
end
|