lib/state_manager/resource.rb in state_manager-0.2.10 vs lib/state_manager/resource.rb in state_manager-0.2.11

- old
+ new

@@ -43,10 +43,10 @@ klass.added_to_resource(self, property, options) # Define the subclass as a constant. We do this for multiple reasons, one # of which is to allow it to be serialized to YAML for delayed_job const_name = "#{property.to_s.camelize}States" - remove_const const_name if const_defined?(const_name) + remove_const const_name if const_defined?(const_name, false) const_set(const_name, klass) # Create an accessor for the state manager on this resource state_managers[property] = klass property_name = "#{property.to_s}_manager" \ No newline at end of file