diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 427545716..362523a7d 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -42,6 +42,10 @@ class FilesController < ApplicationController @unpublish_count = @total_count - @publish_count @attachments = @attachments.by_keywords(params[:search]) + if params[:no_link] + @attachments = @attachments.where(link: nil) + end + @attachments = @attachments.page(@page).per(@page_size) end