lib/classy-inheritance.rb in classy-inheritance-0.4.0 vs lib/classy-inheritance.rb in classy-inheritance-0.4.1
- old
+ new
@@ -80,10 +80,12 @@
if polymorphic_name
eval("self.#{model_sym}.#{polymorphic_name}_type = self.class.name")
eval("self.#{model_sym}.#{polymorphic_name}_id = self.id")
end
- eval("self.#{model_sym}.save")
+ unless polymorphic_name
+ eval("self.#{model_sym}.save")
+ end
end
before_save "save_requisite_#{model_sym}".to_sym
end