Skip to content

Commit

Permalink
Merge pull request #1 from inventables/replace_deprecated_alias_metho…
Browse files Browse the repository at this point in the history
…d_chain

Replace alias_method_chain with alias_method to be compatible with Rails >= 5.1
  • Loading branch information
thomasjlee committed Oct 25, 2021
2 parents 28dd197 + c32ffad commit adc188a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nested_has_many_through/reflection.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module NestedHasManyThrough
module Reflection # :nodoc:
def self.included(base)
base.send :alias_method_chain, :check_validity!, :nested_has_many_through
base.send :alias_method, :check_validity_without_nested_has_many_through!, :check_validity!
base.send :alias_method, :check_validity!, :check_validity_with_nested_has_many_through!
end

def check_validity_with_nested_has_many_through!
Expand Down

0 comments on commit adc188a

Please sign in to comment.