Project

General

Profile

« Previous | Next » 

Revision edf4198b

Added by Ohad Levy almost 14 years ago

  • ID edf4198b504808ba4bec5a354500049e0dbef44a

fixes #271 - remove active scaffold plugin

View differences:

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
......
self.name <=> other.name
end
# Returns the name of this host as a string
# String: the host's name
def to_label
name
end
def to_s
to_label
end
def shortname
domain.nil? ? name : name.chomp("." + domain.name)
end

Also available in: Unified diff