Permalink
Browse files

make unique check a validation instead of a before_save

  • Loading branch information...
jakehow committed Apr 5, 2011
1 parent c9c64fc commit 77e98fc56129016a0baf8538b2f9d412cea11378
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/toy/index.rb
View
@@ -31,7 +31,7 @@ module IndexCallbacks
extend ActiveSupport::Concern
included do
- before_save :check_unique_indices
+ validate :check_unique_indices
after_create :index_create
after_update :index_update
after_destroy :index_destroy

0 comments on commit 77e98fc

Please sign in to comment.