Commit eb4d75b6 by Hasan Kumar Reddy A

Fix: Ignore columns not respected when the rake task is invoked

parent 6fd2fb67
......@@ -143,7 +143,7 @@ module AnnotateModels
info<< "# #{ '-' * ( max_size + md_names_overhead ) } | #{'-' * md_type_allowance} | #{ '-' * 27 }\n"
end
cols = klass.columns
cols = klass.columns.dup
if options[:ignore_columns]
cols.reject! { |col| col.name.match(/#{options[:ignore_columns]}/) }
end
......
......@@ -38,6 +38,7 @@ task :annotate_models => :environment do
options[:trace] = Annotate.true?(ENV['trace'])
options[:wrapper_open] = Annotate.fallback(ENV['wrapper_open'], ENV['wrapper'])
options[:wrapper_close] = Annotate.fallback(ENV['wrapper_close'], ENV['wrapper'])
options[:ignore_columns] = ENV['ignore_columns']
AnnotateModels.do_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