Rails 3.2 app - Should I use a versioning gem (paper_trail or vestal_versions) or handle it manually?

情到浓时终转凉″ 提交于 2019-12-05 09:18:56

My experience is that when you ask the question about making your own solution versus using a third-party solution the answer is almost always 'roll your own.' Not only can you make EXACTLY what you want in terms of functionality, you're not beholden to some other developer to:

  1. Fix their bugs
  2. Support the latest rails update/ruby update, etc.
  3. Not conflict in some way with your app in subtle ways you can't address (require different versions of dependent gems).

I say that if you have the ability you should spend the time and write exactly what you want. It will pay off big time two years from now.

Use PaperTrail, and don't roll your own solution. I strongly disagree with Richard's answer. PaperTrail is a very active project, with many people contributing to bug fixes, supporting the latest Rails and Ruby versions, and handling gem conflicts.

If you don't like the way PaperTrail does something, you should fork it and change that behaviour. If it's a general improvement, submit a pull request so that we can all benefit from your work. Don't rewrite it from scratch, because you don't have the hindsight of bugs and edge-cases that the PaperTrail committers have already been through.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!