Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Gaius Centus Novus's latest activity

Monday, June 22 2009
20 State Transitions Return true but do Nothing was updated in AASM
  • Gaius Centus Novus
    Gaius Centus Novus commented at 11:59 AM

    The problem was that I was using alias_attribute instead of aasm_column:

    # wrong
    class Item
      include AASM
      alias_attribute :aasm_state, :state
    end
    
    # right
    c...
  • Gaius Centus Novus
    Gaius Centus Novus commented at 11:54 AM

    An oddity: after a state transition, read_attribute returns the correct value even though state doesn't:

    i = Item.create!
    i.check_out!
    i.state
    # => 'available'...
  • Gaius Centus Novus
    Gaius Centus Novus created the ticket at 10:40 AM

    I have a class:

    class Item < ActiveRecord::Base
      include AASM
      aasm_initial_state :available
      aasm_state :available
      aasm_state :in_use
      aasm_event(:check...