I would *love* to PDI field level change checking (I've done it before
on another framework) and also updating Base to only UPDATE fields that
have changed.  While it may sound funny, I'm a gung-ho person and would
just need to be pointed in the direction of how to make a plugin.  I
wander through the ActiveRecord code all the time but not all of Rails.
I was pondering adding support with a patch and have some really great
ideas but if it didn't get accepted, I didn't want to waste the time.
Also, how do I check to see if someone else hasn't already started a
plugin/gem/patch for the same issue?

It's more or less impossible to use old value /new value optimistic
locking with active record and retain idiomatic usage.

def update
 @whatever = Whatever.find(1) # selects the new values, undoing your lock
 @whatever.update_attributes params[:something]
end

Rails 1.2 will support pessimistic locking, which will add another
option to your toolbelt.

If you want to try it out,  have a look at optimistic_locking.rb in
activerecord,  it's basically completely stand alone and your plugin
could do almost exactly the same thing.

--
Cheers

Koz
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to