Ruby on rails action code could be shorter
A lot of these logic could be moved to model. Rails provides lot of helpers for validation in your model. 

class Item
  validate :fund_vs_price, :fund_greater_than_zero


  def fund_vs_price
    errors.add(:fund, "Fund amount should not exceed price difference") if fund &gt; price
  end

  def fund_greater_than_zero
    errors.add(:fund, "No money specified.")
  end

  #overriding setter to do a sum every time it is assigned a value
  def fund=(value)
    write_attribute(:fund, fund.to_f + value)
  end
end


With that, the controller becomes really simple.

def addFund
    @item.fund = prams[:fund]
    if @item.save
       respond_to do |format|

         format.html { redirect_to @item, success: 'Fund  added' }
         format.json {render :json =&gt;{:status =&gt;1,
          :error=&gt;"Done"}}
       end
    else
      respond_to do |format|

       format.html { redirect_to @item, error: @item.errors[:fund].join("\n") }
       format.json {render :json =&gt;{:status =&gt;0,
        :error=&gt; @item.errors[:fund].join("\n")}}
      end
    end
  end


If your model becomes too big to maintain, you can always use ActiveSupport concerns to separate it out into different modules. For eg, you could move everything related to validation into a separate module.

There might be some logical errors in the above code since its not tested. But it will give you an idea