Revision 81e2d3f3
Added by Ohad Levy almost 14 years ago
- ID 81e2d3f3f6059d9d4807e57011769ad016d6c2d5
app/models/host.rb | ||
---|---|---|
alias_attribute :os, :operatingsystem
|
||
alias_attribute :arch, :architecture
|
||
alias_attribute :hostname, :name
|
||
alias_attribute :to_s, :name
|
||
alias_attribute :to_label, :name
|
||
|
||
validates_uniqueness_of :name
|
||
validates_presence_of :name, :environment_id
|
||
... | ... | |
domain.nil? ? name : name.chomp("." + domain.name)
|
||
end
|
||
|
||
# defines how many hosts will be shown in the hostlist
|
||
def self.per_page
|
||
20
|
||
end
|
||
|
||
# method to return the correct owner list for host edit owner select dropbox
|
||
def is_owned_by
|
||
owner.id_and_type if owner
|
Also available in: Unified diff
fixes #302 and all references to_label and to_s
removed references to all per_page settings as they are common now