title: Rails - Create/Destroy record in join table
body: <p>I'm working on this record insert/delete I'm not sure what the syntax is to perform the query.</p>
  
  <p>I have a user model and an event model.  I have created a joining table called Personal that stores the user_id, and event_id of any events that the users like.</p>
  
  <p>I created an "Add" method in my events controller so whenever someone clicks it run to that and perform the create logic I'm trying to develop now.The action is tied to a extra column I added to the grid displaying all the events.</p>
  
  <p>The user model =></p>
  
  <pre><code> has_many :personals
  </code></pre>
  
  <p>The event model =></p>
  
  <pre><code>has_many :personals
  </code></pre>
  
  <p>The personal model =></p>
  
  <pre><code>belongs_to :user
  belongs_to :events
  </code></pre>
  
  <p>I thought it would be something like =></p>
  
  <pre><code> @user = User.find(session[:user_id])
   @event = Event.find(params[:id])
   # Personal.new = User.Event?
  </code></pre>
  
  <p>can anyone help?</p>