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/version_setting.rb

36 lines
582 B

class VersionSetting < ActiveRecord::Base
belongs_to :project
belongs_to :version
attr_accessible :display, :project
validates_presence_of :project
DISPLAY_NONE = 1
DISPLAY_LEFT = 2
DISPLAY_RIGHT = 3
def display_right?
self.display == DISPLAY_RIGHT
end
def display_right!
self.display = DISPLAY_RIGHT
end
def display_left?
self.display == DISPLAY_LEFT
end
def display_left!
self.display = DISPLAY_LEFT
end
def display_none?
self.display == DISPLAY_NONE
end
def display_none!
self.display = DISPLAY_NONE
end
end