Sha256: 1ca061ce7f9addeb2daed2afd615ea887e9c94676504b9193ccc4a84419dd628
Contents?: true
Size: 1018 Bytes
Versions: 1
Compression:
Stored size: 1018 Bytes
Contents
desc "Add schema information (as comments) to model and fixture files" task :annotate_models => :environment do require File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'annotate_models')) options={} options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position'] || :before options[:show_indexes] = ENV['show_indexes'] options[:simple_indexes] = ENV['simple_indexes'] options[:model_dir] = ENV['model_dir'] options[:include_version] = ENV['include_version'] options[:require] = ENV['require'] ? ENV['require'].split(',') : [] AnnotateModels.do_annotations(options) end desc "Remove schema information from model and fixture files" task :remove_annotation => :environment do require File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'annotate_models')) options={} options[:model_dir] = ENV['model_dir'] AnnotateModels.remove_annotations(options) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
annotate-2.4.1.beta1 | lib/tasks/annotate_models.rake |