I'm feeling fairly seasoned in Ruby on Rails by now, and have attempted to build my own Rails plugins. Going through that process, however, I realized that I really have not found very many good resources that clearly spell out what the conventions are for creating Rails gems/plugins, and how to efficiently accomplish some of the things that I wanted to do with my plugin.
在我看来,建筑 Rails gems 的文档不是很好,但也许我没有找对地方。为了深入了解其他 gem 的构建方式,我通读了用于用户身份验证的 Devise 插件的一些源代码。我几乎没有发现任何描述类似于 Devise 如何将其自己的方法注入现有模型的过程的过程,尽管这对于许多优秀的 gem 来说似乎是一件非常有用的事情。
我的问题是:我应该去哪里学习如何构建好的 Rails gems?是否有关于如何做某些事情的约定?