OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/models/timelines/scenario.rb

18 lines
548 B

class Timelines::Scenario < ActiveRecord::Base
unloadable
self.table_name = 'timelines_scenarios'
include Timelines::TimestampsCompatibility
include ActiveModel::ForbiddenAttributesProtection
belongs_to :project
has_many :alternate_dates, :class_name => 'Timelines::AlternateDate',
:foreign_key => 'scenario_id',
:dependent => :delete_all
validates_presence_of :name, :project
validates_length_of :name, :maximum => 255, :unless => lambda { |e| e.name.blank? }
end