lib/blueprints/helper.rb in blueprints-0.2.4 vs lib/blueprints/helper.rb in blueprints-0.3.0
- old
+ new
@@ -1,25 +1,25 @@
module Blueprints
module Helper
def build_plan(*names)
- Plan.build(*names)
- Plan.copy_ivars(self)
+ Namespace.root.build(*names)
+ Namespace.root.copy_ivars(self)
end
alias :build :build_plan
def demolish(*args)
options = args.extract_options!
Blueprints.delete_tables(*args)
if options[:undo] == :all
- Plan.executed_plans.clear
+ Namespace.root.executed_plans.clear
else
undo = [options[:undo]].flatten.compact
- unless (not_found = undo - Plan.executed_plans.to_a).blank?
+ unless (not_found = undo - Namespace.root.executed_plans.to_a).blank?
raise(ArgumentError, "Scenario(s) #{not_found} not found")
end
- Plan.executed_plans -= undo
+ Namespace.root.executed_plans -= undo
end
end
end
end
\ No newline at end of file