Hi, I seem to remember seeing the equivalent of saving only if all attributes are different. I can't seem to find that now in the API or the agile book. I'm using the acts_as_versioned and only want to save if the input is different. Thanks, Steve http://www.smarkets.net
on 2006-03-24 14:07
on 2006-03-24 20:39
you can simple compare posted hash with the database record, i.e. something like that if (Model.find(id) == params[:model]) ...
on 2006-03-24 20:42
Thanks, Emin. Yes, that would work, but I thought I read someplace onetime there was a built-in method that woul do this. Steve
on 2006-03-24 20:50
never used acts_as_versioned, but quick look to api shows "changed?" method which should be what you are looking for http://ar-versioned.rubyforge.org/classes/ActiveRe...
on 2006-03-24 20:59
Right on. Thanks Emin.