Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gems/state_machines-0.5.0/lib/state_machines/integrations/base.rb:27:in `<=': compared with non class/module (TypeError) #62

Closed
NielsKSchjoedt opened this issue Dec 1, 2017 · 1 comment

Comments

@NielsKSchjoedt
Copy link

NielsKSchjoedt commented Dec 1, 2017

This occurs when trying to run specs in my rails engine gem where I use state_machines-activerecord, which uses state_machines. No ida why it happens?

Inspecting the output of the method like so:

        # Whether the integration should be used for the given class.
        def matches?(klass)
          matching_ancestors.any? { |ancestor|
            puts "#{klass.inspect} >< #{ancestor.inspect}"
            klass <= ancestor
          }
        end

I get:

DataCollecting::CollectorRun (call 'DataCollecting::CollectorRun.connection' to establish a connection) >< "ActiveRecord::Base"

DataCollecting is one of the classes I use for state_machines

@NielsKSchjoedt
Copy link
Author

Seems like state_machines-activerecord was the sinner here: state-machines/state_machines-activerecord#65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant