Commit 14685d41 by miyucy

remove unnecessary rake

parent 28798b1e
def is_plugin?
(defined? ANNOTATE_MODELS_PREFS::USE_PLUGIN) &&
(!ANNOTATE_MODELS_PREFS::USE_PLUGIN.nil?) ?
ANNOTATE_MODELS_PREFS::USE_PLUGIN : false
end
desc "Add schema information (as comments) to model and fixture files"
task :annotate_models => :environment do
if is_plugin?
require File.expand_path(File.dirname(__FILE__) + '/../annotate/annotate_models')
else
require 'annotate_models'
end
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']
AnnotateModels.do_annotations(options)
end
desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do
if is_plugin?
require File.expand_path(File.dirname(__FILE__) + '/../annotate/annotate_models')
else
require 'annotate_models'
end
AnnotateModels.remove_annotations
end
\ No newline at end of file
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