auto_annotate_models.rake 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # frozen_string_literal: true
  2. if Rails.env.development?
  3. task :set_annotation_options do
  4. Annotate.set_defaults(
  5. 'routes' => 'false',
  6. 'models' => 'true',
  7. 'position_in_routes' => 'before',
  8. 'position_in_class' => 'before',
  9. 'position_in_test' => 'before',
  10. 'position_in_fixture' => 'before',
  11. 'position_in_factory' => 'before',
  12. 'position_in_serializer' => 'before',
  13. 'show_foreign_keys' => 'false',
  14. 'show_indexes' => 'false',
  15. 'simple_indexes' => 'false',
  16. 'model_dir' => 'app/models',
  17. 'root_dir' => '',
  18. 'include_version' => 'false',
  19. 'require' => '',
  20. 'exclude_tests' => 'true',
  21. 'exclude_fixtures' => 'true',
  22. 'exclude_factories' => 'true',
  23. 'exclude_serializers' => 'true',
  24. 'exclude_scaffolds' => 'true',
  25. 'exclude_controllers' => 'true',
  26. 'exclude_helpers' => 'true',
  27. 'ignore_model_sub_dir' => 'false',
  28. 'ignore_columns' => nil,
  29. 'ignore_routes' => nil,
  30. 'ignore_unknown_models' => 'false',
  31. 'hide_limit_column_types' => 'integer,boolean',
  32. 'skip_on_db_migrate' => 'false',
  33. 'format_bare' => 'true',
  34. 'format_rdoc' => 'false',
  35. 'format_markdown' => 'false',
  36. 'sort' => 'false',
  37. 'force' => 'false',
  38. 'trace' => 'false',
  39. 'wrapper_open' => nil,
  40. 'wrapper_close' => nil
  41. )
  42. end
  43. Annotate.load_tasks
  44. end