Rows Affected ..

The #changed method from the ActiveRecord::Dirty module should help with this, it gives you an array of all the attributes (a.k.a columns) you've changed on the model. To use it you have to update the attributes and save in two separate steps.

Something like this:

@user = User.find(params[:id]) @user.attributes = params[:user] @user.changes # Get the array of what was changed here @user.save! # Then save the model after.

Take a look at the documentation for the methods provided in ActiveRecord::Dirty to find out more http://api.rubyonrails.org/classes/ActiveRecord/Dirty.html

Cheers, Jeremy