Commit 8d4c8207 by Alex Chaffee

use model_dir parameter in remove_annotation as well; remove obsolete (and…

use model_dir parameter in remove_annotation as well; remove obsolete (and confusing) annotate.rake file
parent 28a44896
......@@ -214,7 +214,9 @@ module AnnotateModels
end
def remove_annotations(options={})
p options
if options[:model_dir]
puts "removing"
self.model_dir = options[:model_dir]
end
deannotated = []
......
desc "Add schema information (as comments) to model and fixture files"
task :annotate_models => :environment do
require 'annotate_models'
options={}
options[:position_in_class] = ENV['position_in_class'] || ENV['position']
options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position']
options[:include_version] = ENV['include_version']
options[:model_dir] = ENV['model_dir']
AnnotateModels.do_annotations(options)
end
desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do
require 'annotate_models'
options={}
options[:model_dir] = ENV['model_dir']
AnnotateModels.remove_annotations(options)
end
\ No newline at end of file
......@@ -11,5 +11,7 @@ end
desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do
require 'annotate/annotate_models'
AnnotateModels.remove_annotations
options={}
options[:model_dir] = ENV['model_dir']
AnnotateModels.remove_annotations(options)
end
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