On Thu, May 27, 2010 at 10:41 AM, chewmanfoo wrote:
> ISSUE:
> The host has 3 ip addresses on two networks (#62 is repeated)
> How do I get host.networks to return only the two networks?
> ## network_hosts model
> class NetworkHost < ActiveRecord::Base
>
> has_many :ip_addresses, :dependent => :
ISSUE:
The host has 3 ip addresses on two networks (#62 is repeated)
How do I get host.networks to return only the two networks?
>> host
=> #
>> host.ip_addresses.size
=> 3
>> host.networks
=> [#,
#,
#]
>> host.networks.size
=> 3
## networks model
class Network < ActiveRecord::Base
2 matches
Mail list logo