-
Notifications
You must be signed in to change notification settings - Fork 661
Closed
Description
Here's my config:
Annotate.set_defaults(
'routes' => 'false',
'position_in_routes' => 'after',
'position_in_class' => 'after',
'position_in_test' => 'after',
'position_in_fixture' => 'after',
'position_in_factory' => 'after',
'position_in_serializer' => 'after',
'show_foreign_keys' => 'true',
'show_indexes' => 'true',
'simple_indexes' => 'false',
'model_dir' => 'app/models',
'root_dir' => '',
'include_version' => 'false',
'require' => '',
'exclude_tests' => 'false',
'exclude_fixtures' => 'false',
'exclude_factories' => 'false',
'exclude_serializers' => 'false',
'exclude_scaffolds' => 'false',
'exclude_controllers' => 'true',
'exclude_helpers' => 'true',
'ignore_model_sub_dir' => 'false',
'ignore_columns' => nil,
'ignore_unknown_models' => 'false',
'hide_limit_column_types' => 'integer,boolean',
'skip_on_db_migrate' => 'false',
'format_bare' => 'true',
'format_rdoc' => 'false',
'format_markdown' => 'false',
'sort' => 'false',
'force' => 'false',
'trace' => 'false',
'wrapper_open' => nil,
'wrapper_close' => nil,
)
end
After running migration it updates annotations in models, but not in factories, then I have to run bundle exec annotate
to annotate factories:
➜ clarion-core git:(master) ✗ rake db:migrate
== 20160202113832 AddMaxDailyCountToReminder: migrating =======================
-- add_column(:reminders, :max_daily_count, :integer, {:default=>1, :null=>false})
-> 0.0498s
== 20160202113832 AddMaxDailyCountToReminder: migrated (0.0499s) ==============
Annotated (1): app/models/reminder.rb
➜ clarion-core git:(master) ✗ bundle exec annotate
Annotated (1): app/models/reminder.rb
➜ clarion-core git:(master) ✗ bundle exec annotate
Model files unchanged.