Module: Host::Hostmix

Defined in:
app/models/host/hostmix.rb

Instance Method Summary collapse

Instance Method Details

#belongs_to_host(options = {}) ⇒ Object


8
9
10
# File 'app/models/host/hostmix.rb', line 8

def belongs_to_host(options = {})
  belongs_to :host, {:class_name => "Host::Managed", :foreign_key => :host_id}.merge(options)
end

#has_many_hosts(options = {}) ⇒ Object


4
5
6
# File 'app/models/host/hostmix.rb', line 4

def has_many_hosts(options = {})
  has_many :hosts, {:class_name => "Host::Managed"}.merge(options)
end