title: How do I update a postgres boolean field using Active Record in Rails 5?
body: <p>I created a join table like so:</p>
  
  <pre><code>class CreateJoinTablePurchaseUser &lt; ActiveRecord::Migration[5.0]
    def change
      create_join_table :purchases, :users, table_name: :participation_requests do |t|
      # t.index [:purchase_id, :user_id]
      # t.index [:user_id, :purchase_id]
      t.boolean :approved, default: false
    end
  end
  </code></pre>
  
  <p>And here is my model:</p>
  
  <pre><code>class ParticipationRequest &lt; ApplicationRecord
  end
  </code></pre>
  
  <p>I created a row in the table successfully. However, when I try to update the boolean value like so:</p>
  
  <pre><code>pr = ParticipationRequest.find_by(user_id: 1, purchase_id: 1)
  pr.update_attributes(approved: true)
  </code></pre>
  
  <p>pr returns the row and I get a ROLLBACK on the update with this message:</p>
  
  <pre><code>TypeError: nil is not a symbol nor a string
  </code></pre>
  
  <p>I recognized that the join table is different from my other tables in that it is not indexed like my regular tables. The primary key seems to be a combination of the user_id and purchase_id. I have no problem using update_attributes on any of my other tables. Is there something different about this join table that will not allow me to update an attribute this way?</p>