mongoid / mongoid-slug

Generates a URL slug/permalink based on fields in a Mongoid-based model.
https://github.com/mongoid/mongoid-slug
MIT License
492 stars 164 forks source link

Remove deprecated alias_method_chain #241

Closed hugoabonizio closed 7 years ago

hugoabonizio commented 7 years ago

Replace alias_method_chain with equivalent alias_method. Fix #232 .

mongoid-bot commented 7 years ago
2 Warnings
:warning: There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.
:warning: Unless you’re refactoring existing code, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#241](https://github.com/mongoid/mongoid-slug/pull/241): Remove deprecated alias_method_chain - [@hugoabonizio](https://github.com/hugoabonizio).

Generated by :no_entry_sign: danger

dblock commented 7 years ago

The deprecation suggests we use prepend. What's the reason not to do this?

hugoabonizio commented 7 years ago

@dblock I refactored using Module#prepend.

dblock commented 7 years ago

Great stuff.

majedbojan commented 7 years ago

am cloning one project from the bitbuket am still getting this warning i don't know what's it and from where it's coming exactly

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/clickapps/sites/mbeet_api/config/application.rb:18)
Model files unchanged.