title: Ruby on Rails detect changes in attributes in update
body: <p>Hi I have a Rails app in which i wanted to know if an attribute is changed which occurs within the hash
  let me explain i have params for @user</p>
  
  <pre><code>"foo"=&gt; {"name"=&gt; "name1", "age"=&gt; "15", "height"=&gt; "120"}
  </code></pre>
  
  <p>now when i change only attribute age i want to know if the age is changed</p>
  
  <p>what i tried is <code>@user.foo_changed?</code> but it will give true whenever anything changes in the foo hash but i want it to be true only when the age is changed . How can i achieve this ?</p>