Skip to content

Commit

Permalink
Fix regression in model class checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs committed Mar 13, 2013
1 parent 3341d17 commit 79e5244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cave/model_form.rb
Expand Up @@ -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
Expand Down

0 comments on commit 79e5244

Please sign in to comment.