init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class Machine < ActiveRecord::Base
|
||||
# attr_accessible :title, :body
|
||||
|
||||
# validates :title, :presence => true
|
||||
# validates :body, :presence => true
|
||||
|
||||
has_many :services
|
||||
belongs_to :local_network
|
||||
|
||||
# scope :published, -> { order("created_at DESC") }
|
||||
|
||||
# def tailscale_ip
|
||||
# tailscale_ip
|
||||
# end
|
||||
|
||||
def local_domain
|
||||
"#{domain}.#{local_network.tld}"
|
||||
end
|
||||
|
||||
def local_ip
|
||||
"#{local_network.subnet}.#{local_ip_octet}"
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user