created template selecting
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
class Server < ActiveRecord::Base
|
||||
belongs_to :operating_system
|
||||
before_create :generate_hash
|
||||
has_many :configuration_files
|
||||
|
||||
def generate_hash
|
||||
self.namehash = SecureRandom.hex
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{name} - #{namehash}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user