diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 05a9ab841..b75020643 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -23,8 +23,8 @@ class FilesController < ApplicationController get_category(@course, course_second_category_id) @total_count = @attachments.size - @public_count = @attachments.publiced.size - @private_count = @total_count - @public_count + @publish_count = @attachments.published.size + @unpublish_count = @total_count - @publish_count @attachments = @attachments.by_keywords(params[:search]) @attachments = diff --git a/app/views/files/index.json.jbuilder b/app/views/files/index.json.jbuilder index 03b4d4892..81fa406dd 100644 --- a/app/views/files/index.json.jbuilder +++ b/app/views/files/index.json.jbuilder @@ -3,8 +3,8 @@ json.data do json.id @category_id json.name @category_name json.total_count @total_count - json.public_count @public_count - json.private_count @private_count + json.publish_count @publish_count + json.unpublish_count @unpublish_count json.course_is_public @course.is_public? json.files do json.array! @attachments do |attachment|