Commit 396db8df by Cuong Tran

Merge pull request #261 from yujideveloper/bugfix/show-foreign-keys-in-rake

show foreign keys when run on rake task
parents 98c182ef ed1b7652
...@@ -17,6 +17,7 @@ task :annotate_models => :environment do ...@@ -17,6 +17,7 @@ task :annotate_models => :environment do
options[:position_in_factory] = Annotate.fallback(ENV['position_in_factory'], ENV['position']) options[:position_in_factory] = Annotate.fallback(ENV['position_in_factory'], ENV['position'])
options[:position_in_test] = Annotate.fallback(ENV['position_in_test'], ENV['position']) options[:position_in_test] = Annotate.fallback(ENV['position_in_test'], ENV['position'])
options[:position_in_serializer] = Annotate.fallback(ENV['position_in_serializer'], ENV['position']) options[:position_in_serializer] = Annotate.fallback(ENV['position_in_serializer'], ENV['position'])
options[:show_foreign_keys] = Annotate.true?(ENV['show_foreign_keys'])
options[:show_indexes] = Annotate.true?(ENV['show_indexes']) options[:show_indexes] = Annotate.true?(ENV['show_indexes'])
options[:simple_indexes] = Annotate.true?(ENV['simple_indexes']) options[:simple_indexes] = Annotate.true?(ENV['simple_indexes'])
options[:model_dir] = ENV['model_dir'] ? ENV['model_dir'].split(',') : [] options[:model_dir] = ENV['model_dir'] ? ENV['model_dir'].split(',') : []
......
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