Sha256: 79e72d1557224b50abc799473b5512becc05ff3d885cfe99ed83abcf5db9c09e
Contents?: true
Size: 373 Bytes
Versions: 4
Compression:
Stored size: 373 Bytes
Contents
class ControllerDevice < ActiveRecord::Base belongs_to :control_system belongs_to :dependency has_many :settings, :as => :object, :dependent => :destroy before_validation :check_port protected def check_port if self[:port].nil? self[:port] = dependency.default_port end end validates_presence_of :control_system, :dependency, :ip, :port end
Version data entries
4 entries across 4 versions & 1 rubygems