Revision 1367:a2e51c0a7860 plugins/redmine_bibliography

View differences:

plugins/redmine_bibliography/app/models/authorship.rb
12 12
  attr_accessor :search_author_class, :search_author_id, :search_name, :search_results, :identify_author
13 13

  
14 14
  before_create :associate_author_user
15
  before_update :delete_publication_cache
15 16

  
16 17
  # tod: review scope of ordering
17 18
  acts_as_list :column => 'auth_order'
......
46 47
  end
47 48

  
48 49
  protected
50

  
51
  def delete_publication_cache
52
    publication = Publication.find(self.publication_id)
53
    Rails.cache.delete "publication-#{publication.id}-ieee"
54
    Rails.cache.delete "publication-#{publication.id}-bibtex"
55
  end
56

  
49 57
  def associate_author_user
50

  
51
    logger.error { "search_author_class '#{self.search_author_class}'" }
52

  
53 58
    case self.search_author_class
54 59
    when ""
55 60
      logger.debug { "Unknown Author to be added..." }

Also available in: Unified diff