Class: FrontEnd::ProjectsController

Inherits:
MainApplicationController
  • Object
show all
Defined in:
app/controllers/c/front_end/projects_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
10
# File 'app/controllers/c/front_end/projects_controller.rb', line 7

def index
  get_page C::Page, 'projects'
  @projects = C::Project.order(created_at: 'DESC')
end

#showObject



12
13
14
15
16
17
# File 'app/controllers/c/front_end/projects_controller.rb', line 12

def show
  get_page C::Project
  @project = @page
  redirect_to root_url unless @project.published || user_signed_in?
  force_clean_url @project
end