Revision aa1796f3
Added by Paul Kelly almost 14 years ago
- ID aa1796f3efcd11e491ee2e55a91e6ae86529e8ea
app/models/parameter.rb | ||
---|---|---|
class Parameter < ActiveRecord::Base
|
||
acts_as_audited
|
||
validates_presence_of :name, :value
|
||
validates_format_of :name, :value, :with => /\A(\S+\s?)+\Z/, :message => "can't be blank or contain trailing white space"
|
||
validates_presence_of :name, :value
|
||
validates_format_of :name, :value, :with => /\A(\S+\s?)+\Z/, :message => "can't be blank or contain trailing white space"
|
||
|
||
validates_presence_of :reference_id, :message => "parameters require an associated domain, host or hostgroup", :unless => 'nested or self.is_a? CommonParameter'
|
||
|
||
attr_accessor :nested
|
||
end
|
Also available in: Unified diff
Fixes #261 - parameters now use a single reference_id
This implementation uses STI but the table looks the same for all
variants. This is a little strange but it seems to work.
Also removed obsolete controllers and tests
Added more tests