Changeset [d6f992b4f5e5c515a189af2fd4b4dc007f63e3ec] by Rick Song

August 10th, 2018 @ 06:15 AM

Enable AASM scopes to be defined on abstract classes (#560)

Currently, if aasm is called on an abstract class, the scopes are not
properly defined because it infers the table_name at time of creation.
This change pushes the inference of table_name to when the scope is
called which enables scopes to be dynamically defined in descendant
models.
https://github.com/aasm/aasm/commit/d6f992b4f5e5c515a189af2fd4b4dc0...

Committed by Rick Song

  • M CHANGELOG.md
  • M lib/aasm/persistence/active_record_persistence.rb
  • M spec/database.rb
  • M spec/models/active_record/simple_new_dsl.rb
  • M spec/unit/persistence/active_record_persistence_spec.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Library for adding state machines to Ruby classes. Includes persistence layers for things like ActiveRecord. Formerly known as acts_as_state_machine.