Skip to content

Commit

Permalink
Don't reify has many through by default
Browse files Browse the repository at this point in the history
  • Loading branch information
imperialhare committed Aug 18, 2015
1 parent 7d7af89 commit 4d63edd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/paper_trail/version_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def reify(options = {})
:mark_for_destruction => false,
:has_one => false,
:has_many => false,
:through => false,
:unversioned_attributes => :nil
)

Expand Down Expand Up @@ -366,7 +367,9 @@ def reify_has_manys(model, options = {})
model.class.reflect_on_all_associations(:has_many).
partition { |assoc| assoc.options[:through] }
reify_has_many_directly(assoc_has_many_directly, model, options)
reify_has_many_through(assoc_has_many_through, model, options)
unless options[:through] == false
reify_has_many_through(assoc_has_many_through, model, options)
end
end

# Restore the `model`'s has_many associations not associated through
Expand Down

0 comments on commit 4d63edd

Please sign in to comment.