Changeset [d6f992b4f5e5c515a189af2fd4b4dc007f63e3ec] by Rick Song
Revision d6f992b4f5e5c515a189af2fd4b4dc007f63e3ec,
committed 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...
5 changed files
-
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