title: Rails update_attributes not working
body: <p>In my Rails app, <code>update_attribute</code> seems not working. I'm trying to update a boolean field called <code>billed</code>. The same command works great for two other tables.</p>
  
  <p>Output of <code>rails console</code>:</p>
  
  <pre><code>&gt;&gt; Expense.find(28).update_attributes(:billed =&gt; true)
  =&gt; false
  &gt;&gt; Expense.find(28).billed
  =&gt; false
  </code></pre>
  
  <p><code>expenses_controller.rb</code>:</p>
  
  <pre><code># PUT /expenses/1
  # PUT /expenses/1.json
  def update
    @expense = Expense.find(params[:id])
  
    respond_to do |format|
      if @expense.update_attributes(params[:expense])
        format.html { redirect_to @expense, notice: 'Expense was successfully updated.' }
        format.json { render json: @expense }
      else
        format.html { render action: "edit" }
        format.json { render json: @expense.errors, status: :unprocessable_entity }
      end
    end
  end
  </code></pre>
  
  <p>Expenses has these validations:</p>
  
  <pre><code>  validates_presence_of :employee_id       # Declare a required field
    validates_presence_of :unitcost          # Declare a required field
    validates_presence_of :quantity          # Declare a required field
    validates_presence_of :exp_date          # Declare a required field
    validates_presence_of :category_id       # Declare a required field
    validates_presence_of :description       # Declare a required field
    validates_presence_of :markup            # Declare a required field
    validates :markup, :format =&gt; { :with =&gt; /^\d{3}$/}, :numericality =&gt; {:greater_than =&gt; 0}
    validates :unitcost, :format =&gt; { :with =&gt; /\A\d+(?:\.\d{0,2})?\z/}, :numericality =&gt; {:greater_than =&gt; 0}
    validates_numericality_of :quantity, :only_integer =&gt; true, :message =&gt; "Can only be whole number."
  </code></pre>
  
  <p>Thanks for the help!</p>