Ruby on Rails: alias_method_chain, what exactly does it do?

前端 未结 4 1839
陌清茗
陌清茗 2020-12-12 18:11

I\'ve tried reading through various blog posts that attempt to explain alias_method_chain and the reasons to use it and not use it. In particular, I took heed to:

ht

4条回答
  •  天涯浪人
    2020-12-12 18:30

    alias_method_chain has been deprecated in Rails 5 in favour of Module#prepend.

    Pull request: https://github.com/rails/rails/pull/19434

    Changelog: https://github.com/rails/rails/blob/b292b76c2dd0f04fb090d49b90716a0e6037b41a/guides/source/5_0_release_notes.md#deprecations-4

提交回复
热议问题