From cb2c5960fc746e15a87c79f41e63d97f5cbb9ab6 Mon Sep 17 00:00:00 2001 From: nwb Date: Wed, 11 Jun 2014 11:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=BA=90=E6=96=87?= =?UTF-8?q?=E4=BB=B6activity=E4=BA=8B=E4=BB=B6BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 9cc56b19e..71676467a 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -39,10 +39,9 @@ class Attachment < ActiveRecord::Base acts_as_activity_provider :type => 'course_files', - :permission => :view_files, :author_key => :author_id, :find_options => {:select => "#{Attachment.table_name}.*", - :joins => "LEFT JOIN #{Course.table_name} ( #{Attachment.table_name}.container_type='Course' AND #{Attachment.table_name}.container_id = #{Course.table_name}.id )"} + :joins => "LEFT JOIN #{Course.table_name} ON ( #{Attachment.table_name}.container_type='Course' AND #{Attachment.table_name}.container_id = #{Course.table_name}.id )"} acts_as_activity_provider :type => 'files', :permission => :view_files,