We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When ActiveRecord is not available in production (eg if using Mongoid AR is not loaded) the model_instance.aasm.human_state throws an exception:
NameError: uninitialized constant AASM::Localizer::ActiveRecord
This is because AASM::Localizer#ancestros_list references this class:
def ancestors_list(klass) klass.ancestors.select do |ancestor| ancestor.respond_to?(:model_name) unless ancestor == ActiveRecord::Base end end
Quick fix is to use class.name instead:
def ancestors_list(klass) klass.ancestors.select do |ancestor| ancestor.respond_to?(:model_name) unless ancestor.name == 'ActiveRecord::Base' end end
The text was updated successfully, but these errors were encountered:
bugfix: don't require ActiveRecord for localizing AASM event and stat…
1c2f36f
…e name #113
Thanks for pointing this out! I released version 3.1.1 to fix this.
Sorry, something went wrong.
alto
No branches or pull requests
When ActiveRecord is not available in production (eg if using Mongoid AR is not loaded) the model_instance.aasm.human_state throws an exception:
This is because AASM::Localizer#ancestros_list references this class:
Quick fix is to use class.name instead:
The text was updated successfully, but these errors were encountered: