Commit 5e4f9292 by Michael Deimel

nicer require for including the tasks

parent 95638467
desc "Add schema information (as comments) to model and fixture files" desc "Add schema information (as comments) to model and fixture files"
task :annotate_models => :environment do task :annotate_models => :environment do
require 'annotate/annotate_models' require File.join(File.dirname(__FILE__), '..','annotate','annotate_models')
options={} options={}
options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before
options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position'] || :before options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position'] || :before
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
desc "Remove schema information from model and fixture files" desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do task :remove_annotation => :environment do
require 'annotate/annotate_models' require File.join(File.dirname(__FILE__), '..', 'annotate','annotate_models')
options={} options={}
options[:model_dir] = ENV['model_dir'] options[:model_dir] = ENV['model_dir']
AnnotateModels.remove_annotations(options) AnnotateModels.remove_annotations(options)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment