Permalink
Browse files

Fix regression in model class checking

  • Loading branch information...
1 parent 3341d17 commit 79e5244e96e6c94857eda2552067ffd4f8ecef25 @jamesdabbs committed Mar 13, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cave/model_form.rb
View
@@ -30,8 +30,8 @@ def persist!
private #-----------
def check_instance_model
+ model = self.class.model
if @instance
- model = self.class.model
# Pry alters models in such a way that the first check may fail when it
# shouldn't. The second should still be fairly safe.
unless @instance.is_a?(model) || @instance.class.name == model.name

0 comments on commit 79e5244

Please sign in to comment.