auto_annotate_models.rake 1.6 KB

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