title: Compare incoming object with record in the database in ruby on rails
body: <p>I have been trying to compare two objects in rails, the first is from a new record and the other is a record in the database but I have not achieved it, what I have been doing is the following:</p>
  
  <pre><code>def update
    new_biological_target = params[:biological_target]
    old_biological_target = BiologicalTarget.find(params[:biological_target][:id])
  
    if new_biological_target == old_biological_target
      message="Equals"
    else
      message="different"
    end
  end
  </code></pre>
  
  <p>What I want to compare is that if the user made any changes to the registry </p>