title: how to add records to has_many :through association in Ruby on rails
body: <p>I have these models</p>
  
  <pre><code>class EventGroups &lt; ActiveRecord::Base      
    has_many  :festival_venues
    has_many  :venues, :through =&gt; :festival_venues    
  end
  
  class Venue &lt; ActiveRecord::Base 
    has_many  :festival_venues
    has_many  :event_groups, :through =&gt; :festival_venues 
  end
  
  class FestivalVenue &lt; ActiveRecord::Base 
    belongs_to :event_group
    belongs_to :venue
  end
  </code></pre>
  
  <ol>
  <li>Now I want to create a <strong>Venue</strong> via <strong>Eventgroups</strong>, and record in the <strong>FestivalVenue</strong> should be created as well.</li>
  <li>When i delete <strong>Eventgroups</strong> related record in <strong>Venue</strong> and 
  <strong>FestivalVenue</strong> should be deleted as well.</li>
  </ol>
  
  <p>How can i do this?</p>