HTTPS clone URL
Subversion checkout URL
Please sign in to comment.
Add :only_if_modified option to validates_unique method in validation…
…_helpers plugin Using this option should speed up the common case where the unique attribute is not modified for an existing record. It is not on by default, since the following is possible: album = Album album.name # 'YJM' # Database is modified outside application: # UPDATE albums SET name ='BB' WHERE id = 1 # UPDATE albums SET name = 'YJM' WHERE id = 2 # Would violate uniqueness constraint by setting album 1's # name back to 'YJM' album.save
- Loading branch information...
Showing with 44 additions and 2 deletions.