Changeset [0faff1fcf0e6727291c7edc2b2ec4ff9b3f00387] by Anil
Revision 0faff1fcf0e6727291c7edc2b2ec4ff9b3f00387,
committed by Anil
· October 3rd, 2015 @ 05:50 PM
Raise 'column_name undefined error' when column not present
When using enum for state column and enum config not set
explicitly,
if column is not present in database then "NoMethodError:
undefined
method 'type' for nil:NilClass" was raised for transitions which
is
hard to debug.
Fix #152
https://github.com/aasm/aasm/commit/0faff1fcf0e6727291c7edc2b2ec4ff...
5 changed files
-
A
spec/models/active_record/with_enum_without_column.rb -
M
lib/aasm/persistence/active_record_persistence.rb -
M
spec/database.rb -
M
spec/unit/persistence/active_record_persistence_multiple_spec.rb -
M
spec/unit/persistence/active_record_persistence_spec.rb