Revision 446:995d4c99843d vendor/plugins/redmine_bibliography/app/models

View differences:

vendor/plugins/redmine_bibliography/app/models/publication.rb
5 5
  
6 6
  has_many :authorships
7 7
  has_many :authors, :through => :authorships
8
  
8 9
  has_one :bibtex_entry, :dependent => :destroy
9 10

  
10 11
  validates_presence_of :title
11 12

  
12 13
  accepts_nested_attributes_for :authorships
13
  accepts_nested_attributes_for :authors, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true
14
#  accepts_nested_attributes_for :bibtex_entry, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true 
15
  
16
  
14
  accepts_nested_attributes_for :authors, :allow_destroy => true
15
  accepts_nested_attributes_for :bibtex_entry, :allow_destroy => true 
17 16
  
18 17
  attr_writer :current_step
19 18

  

Also available in: Unified diff