如何要求模块扩展代码

发布于 2024-11-23 21:04:11 字数 490 浏览 5 评论 0原文

我的设置:Rails 3.0.9,Ruby 1.9.2

我需要扩展 Active Merchant 模块以包含我自己的代码,我正在关注此处的文章 http://blog.matthodan.com/how-to -add-support-for-paypal-website- payment

根据文章,我创建了 paypal_recurring_ payments.rb /vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/。接下来,我必须修改 Active Merchant gem 文件 paypal.rb 以添加一行代码。问题是我无法将该代码更改部署到 Heroku,因此我需要另一种方法来执行此操作。任何见解将不胜感激。

My setup: Rails 3.0.9, Ruby 1.9.2

I need to extend Active Merchant module to include my own code, I'm following the article here
http://blog.matthodan.com/how-to-add-support-for-paypal-website-payment

As per the article, I created paypal_recurring_payments.rb in /vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/. Next I have to modify an Active Merchant gem file paypal.rb to add a line of code. The problem is that I can't deploy that code change to Heroku, so I need an alternate way of doing this. Any insights will be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娜些时光,永不杰束 2024-11-30 21:04:20
  1. github 上分叉 gem
  2. 对您的 gem 分叉进行适当的更改。
  3. 使用 :git 选项在 Gemfile 中引用您的分支。有关示例,请参阅文档
  1. Fork the gem on github
  2. Make the appropriate change to your fork of the gem.
  3. Reference your fork in the Gemfile using the :git option. See the docs for examples.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文