Yes!  that's it!  thanks!

On May 27, 4:14 pm, Hassan Schroeder <hassan.schroe...@gmail.com>
wrote:
> On Thu, May 27, 2010 at 10:41 AM, chewmanfoo <chewman...@gmail.com> 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 => :destroy
> >  has_many :networks, :through => :ip_addresses
>
> Wouldn't
>
>   has_many :networks, :through => :ip_addresses, :uniq => true
>
> do it?
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
> twitter: @hassan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to