Skip to content

Commit

Permalink
Merge 2413cd3 into 439c0e1
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed G. Law committed Jul 19, 2017
2 parents 439c0e1 + 2413cd3 commit c579dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/history/trackable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def track_history(options = {})

field options[:version_field].to_sym, type: Integer

belongs_to_modifier_options = { class_name: Mongoid::History.modifier_class_name }
belongs_to_modifier_options = { class_name: Mongoid::History.modifier_class_name, optional: true }
belongs_to_modifier_options[:inverse_of] = options[:modifier_field_inverse_of] if options.key?(:modifier_field_inverse_of)
belongs_to options[:modifier_field].to_sym, belongs_to_modifier_options

Expand Down

0 comments on commit c579dea

Please sign in to comment.