Sha256: 1a20126e2a407ea4e2156a767356e3d3d045982c2bfa15b1440076106419bb74

Contents?: true

Size: 359 Bytes

Versions: 4

Compression:

Stored size: 359 Bytes

Contents

class ControllerHttpService < ActiveRecord::Base
	belongs_to	:control_system
	belongs_to	:dependency
	has_many :settings, :as => :object,		:dependent => :destroy
	
	before_validation :check_uri
	
	protected
	
	def check_uri
		if self[:uri].nil?
			self[:uri] = dependency.default_uri
		end
	end
	
	validates_presence_of :control_system, :dependency, :uri
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
automate-em-0.0.4 app/models/controller_http_service.rb
automate-em-0.0.3 app/models/controller_http_service.rb
automate-em-0.0.2 app/models/controller_http_service.rb
automate-em-0.0.1 app/models/controller_http_service.rb