Changeset [0faff1fcf0e6727291c7edc2b2ec4ff9b3f00387] 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...

Committed by Anil

  • 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
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.