Merge pull request #321 from opf/feature/rails3_error_fix

Fixed comment and non-functional error check
pull/322/merge
Philipp Tessenow 11 years ago
commit 7a51cbea1c
  1. 2
      db/migrate/20130807141542_remove_files_attached_to_projects_and_versions.rb
  2. 3
      lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb

@ -3,7 +3,7 @@ class RemoveFilesAttachedToProjectsAndVersions < ActiveRecord::Migration
if Attachment.where(:container_type => ['Version','Project']).any?
raise "There are still attachments attached to Versions or Projects, please remove them."
end
#undocument this code if you want do delete all existing files attached to projects and versions
#uncomment this code if you want do delete all existing files attached to projects and versions
#Attachment.where(:container_type => ['Version','Project']).destroy_all
end

@ -46,8 +46,9 @@ module Redmine
module ClassMethods
# Returns events of type event_type visible by user that occured between from and to
def find_events(event_type, user, from, to, options)
raise "#{self.name} can not provide #{event_type} events." if activity_provider_options[event_type].nil?
provider_options = activity_provider_options[event_type].dup
raise "#{self.name} can not provide #{event_type} events." if provider_options.nil?
scope_options = {}
cond = ARCondition.new

Loading…
Cancel
Save