Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make unique check a validation instead of a before_save

  • Loading branch information...
commit 77e98fc56129016a0baf8538b2f9d412cea11378 1 parent c9c64fc
@jakehow authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/toy/index.rb
View
2  lib/toy/index.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.