|
|
|
@ -11,11 +11,11 @@ class StoresController < ApplicationController
|
|
|
|
|
def index
|
|
|
|
|
# @projects_attach = project_classification(0).take(LIMIT)
|
|
|
|
|
# @courses_attach = project_classification(1).take(LIMIT)
|
|
|
|
|
@projects_attach = Attachment.includes(:project).where("projects.project_type=?", 0).
|
|
|
|
|
@projects_attach = Attachment.includes(:project).where("projects.project_type=? AND projects.is_public = ?", 0, 1).
|
|
|
|
|
reorder("#{Attachment.table_name}.downloads DESC").
|
|
|
|
|
limit(LIMIT)
|
|
|
|
|
|
|
|
|
|
@courses_attach = Attachment.includes(:project).where("projects.project_type=?", 1).
|
|
|
|
|
@courses_attach = Attachment.includes(:project).where("projects.project_type=? AND projects.is_public = ?", 1, 1).
|
|
|
|
|
reorder("#{Attachment.table_name}.downloads DESC").
|
|
|
|
|
limit(LIMIT)
|
|
|
|
|
@homeworks_attach = Attachment.where("container_type = 'HomeworkAttach'").
|
|
|
|
|