Code
@abc = Abc.find(1,:lock => true)
@abc.update_attributes!(:title => "ABC title")
update_attributes will relea开发者_JAVA百科se a lock or not ? OR only @abc.save! will release a lock ?
# File activeresource/lib/active_resource/base.rb, line 1267
def update_attributes(attributes)
load(attributes) && save
end
So if save releases a lock, then update_attributes will do the same.
精彩评论