Revision 385:a6f8c0584a92 vendor/plugins/redmine_bibliography/app/models

View differences:

vendor/plugins/redmine_bibliography/app/models/publication.rb
1
# vendor/plugins/redmine_bibliography/app/models/publication.rb
2

  
1 3
class Publication < ActiveRecord::Base
2 4
  has_many :authorships
3 5
  has_many :authors, :through => :authorships
4 6

  
5 7
  validates_presence_of :title
8
  
9
  attr_writer :current_step
10

  
11
  def current_step
12
    @current_step || steps.first
13
  end
14
  
15
  def steps
16
    %w[new review]
17
  end
18

  
6 19

  
7 20
end

Also available in: Unified diff