title: how can I add reservations for a booking system in rails
body: <p>Hello im trying to make a Restaurant-Website with a simple booking-system for tables with ruby on rails (V.: 3.2.13).
  I have 3 tables: Customers(name,Email), Reservations(table_id,customer_id), Tables(seats,area).</p>
  
  <p>I have configured the models like the following:</p>
  
  <pre><code>class Reservation &lt; ActiveRecord::Base
    belongs_to :customer
    belongs_to :table
  end
  
  class Customer &lt; ActiveRecord::Base
    has_many :reservations
    has_many :tables, :through =&gt; :reservations
  end
  
  class Table &lt; ActiveRecord::Base
    has_many :reservations
    has_many :customers, :through =&gt; :reservations
  end
  </code></pre>
  
  <p>I made a search with the form_tag for the choice of a table. If the customer found the right table he can click on the "book this table"-link and then he is directed 
  to new_customer_path to apply his name and Email address. 
  My problem is now the reservation. How can I dynamically/automatically add reservations with the chosen table and the new created customer?</p>
  
  <p>Thank you in advance.</p>
  
  <p>mbc0815</p>