title: Active Admin Gem Model Association.
body: <p>I just started using Active Admin Gem. I have a little bit of a problem and i was wondering if anyone had a solution.</p>
  
  <p>I have two models </p>
  
  <p><strong>Dogs</strong><br>
  <strong>Breeders</strong></p>
  
  <p>Using my application i would like to be able to </p>
  
  <ol>
  <li>find dogs breeds and then while viewing the dog have a list of breeders. </li>
  <li>When i visit the breeders (show page) i want to be able to see the dog breeds they have.</li>
  </ol>
  
  <p>I have created the models but i am not sure how to accoumplish the task, However u have attempeted by creating a join table</p>
  
  <p><strong>breeders_dogs join table</strong>  </p>
  
  <pre><code>class BreedersDogs &lt; ActiveRecord::Migration
     def self.up
     create_table 'breeders_dogs', :id =&gt; false do |t|
      t.integer :breeder_id
      t.integer :dog_id
    end
    end
  
  
     def self.down
    drop_table :breeders_dogs
    end
  
  end
  </code></pre>
  
  <p><strong>Dogs Model</strong>  </p>
  
  <pre><code>class Dog &lt; ActiveRecord::Base
     has_and_belongs_to_many :breeders, :join_table =&gt; :breeders_dogs
  
  end
  </code></pre>
  
  <p><strong>Breeder Model</strong>  </p>
  
  <pre><code>class Breeder &lt; ActiveRecord::Base
     has_and_belongs_to_many :dogs,  :join_table =&gt; :breeders_dogs
  end
  </code></pre>
  
  <p>I tried this but the situation is not the same. <a href="https://stackoverflow.com/questions/6024364/using-rails-gem-active-admin-with-associations">Using Rails Gem Active Admin with Associations</a></p>
  
  <p>I am strugling on how to create this association between the two models. Thank you in advance.</p>