Skip to content

Custom charge_extensions gives raise_validation_error #520

Description

@Rubioli

First of all, THANKS a lot for such a great gem!

In my application, I have an Order model and I'm trying to set up the charge_extensions just as your example, but I get:

pid=59586 tid=ows2z4q26 WARN: ActiveRecord::RecordInvalid: Validation failed: Order must exist

And raise_validation_error

This is my charge_extensions:

module ChargeExtensions
  extend ActiveSupport::Concern

  included do
    belongs_to :order
    after_create :fulfill_order
  end

  def fulfill_order
    order.fulfill!
  end
end

PS: do I need to have a column called fulfill in my Order model?

I appreciate any help and thanks in advanced

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions