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.

Activity (RSS)

Sunday, August 09 2009
Making the specs rcov runnable http:/... was committed by Rob Kaufman at 12:13 AM
Bump for gem build http://github.com/... was committed by Scott Petersen at 12:13 AM
Added array option for new callbacks ... was committed by Scott Petersen at 12:13 AM
Fixed alias_method_chain calls in act... was committed by factorylabs at 12:13 AM
Updated some docs, etc http://github.... was committed by Scott Petersen at 12:13 AM
Added new callbacks with slightly mor... was committed by Scott Petersen at 12:13 AM
Added initial state Proc support. Add... was committed by Nathaniel Bibler at 12:13 AM
Added vim swapfiles to .gitignore htt... was committed by Scott Petersen at 12:13 AM
Saturday, August 08 2009
reorganize things a bit http://github... was committed by Scott Barron at 10:56 AM
Merge branch 'master' of git@github.c... was committed by Scott Barron at 9:39 AM
bump version and fix gemspec http://g... was committed by Scott Barron at 9:39 AM
Handle inheritance properly, there wa... was committed by Scott Barron at 9:39 AM
Monday, June 22 2009
20 State Transitions Return true but do Nothing was updated
  • 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...
Thursday, June 11 2009
10 Stack level too deep w/ railroad was updated
  • Courtenay
    Courtenay commented at 11:04 PM

    There's something in newer versions of rails that fucks with AASM. You also have to do something like

    include AASM unless defined?(AASM)
    

    in your models :( oth...

  • Courtenay
    Courtenay commented at 1:43 PM

    This patch works for me, it seems.. except it's method_defined?, not defined_method?

Friday, May 15 2009
10 Stack level too deep w/ railroad was updated
  • Dave Nolan
    • Tag set to persistance, railroad, rspec, stack-level
    by Dave Nolan at 10:50 AM

    Not sure blame lies with AASM here.

    It's not just Railroad, it's anytime that ActiveRecordPersistance is being included more than once in the same class.

    For ex...

Sunday, May 10 2009
10 Stack level too deep w/ railroad was updated
  • Courtenay
    Courtenay commented at 8:46 PM

    Appears to be an issue with this code [active_record_persistence.rb:238]

    
          module NamedScopeMethods
            def aasm_state_with_named_scope name, option...
  • Courtenay
    Courtenay commented at 8:33 PM

    I don't run railroad..

  • Courtenay
    Courtenay commented at 8:19 PM

    I'm seeing this too. Going to try and get a failing testcase.

Thursday, April 16 2009
19 State change should not trigger callbacks was created
  • Pete P.
    Pete P. created the ticket at 1:40 AM

    Right now, AASM uses update_attribute to perform the state change. This avoids validation but does not avoid the other callbacks.

    Ideally, the update should tak...

Sunday, April 12 2009
18 State transitions do not persist to DB in ActiveRecord models was created
  • Jaryl Sim
    Jaryl Sim created the ticket at 5:07 PM

    foo.bar! does not persist to the database due to a failed validation. The documentation for the WriteState::aasm_write_state method indicates that update_attrib...

Wednesday, April 08 2009
11 [Patch] Define state actions as method array was updated
  • Nathaniel Bibler
    • Title changed from Define state actions as method array to [Patch] Define state actions as method array
    by Nathaniel Bibler at 3:33 PM
14 [Patch] Dynamically set initial state was updated
  • Nathaniel Bibler
    • Title changed from Dynamically set initial state to [Patch] Dynamically set initial state
    by Nathaniel Bibler at 3:33 PM
Friday, March 27 2009
6 Fails to execute initial state callbacks was updated
  • Brandon Palmen
    Brandon Palmen commented at 3:55 PM

    Yes, the same is true of :after callbacks. The new :on_transition event callbacks are essentially :before.. no good as a replacement for :after.

    We need this ba...

Thursday, March 26 2009
17 syntax error - versions 2.0.4 and 2.0.5 was updated
  • Rick
    Rick commented at 4:23 PM

    That previous possible fix does not work. I must be losing the connection between my eyes and my brain.

    A colon is no longer allowed in association with the whe...

  • Rick
    Rick commented at 3:59 PM

    So here's another possible fix:

    when String, Symbol:

    when String, Symbol :

    This change passes muster with 1.9.1p0. The rule seems to be "then | :" is optional w...

  • Rick
    Rick commented at 3:40 PM

    The trailing colon in the when expression is seems to be allowed in Ruby 1.8.7 but not required. However, Ruby 1.9.1p0 will not allow the trailing colon.

    I don'...

  • Rick
    Rick created the ticket at 3:09 PM

    From: rubyist-aasm-2.0.[45]/lib/event.rb

      def execute_success_callback(obj)
        case success
        when String, Symbol:
          obj.send(success)
        when Array:
    ...
Monday, March 23 2009
16 Previous (or current) and new states the same when calling aasm_event_fired() was created
  • Cassiano D'Andrea
    Cassiano D'Andrea created the ticket at 1:59 PM

    When calling the :aasm_event_fired method (when defined), automatically fired by AASM::aasm_fire_event, the previous (or current) and new states seem to always ...

Sunday, March 22 2009
15 DOC : Automated adding routes + custum action bar was created
  • Deleted User
    Deleted User created the ticket at 5:41 PM

    This is for the readme :

    • To reduce the coding work when you modify your state machine, you can ignore the routes.rb file !

    you can code your route as :

    
     ...
Wednesday, March 11 2009
11 Define state actions as method array was updated
  • Nathaniel Bibler
    Nathaniel Bibler commented at 4:50 PM

    Actually, here's a better patch that supports multiple callbacks for all areas (except guards).

    I created a separate Callbacks module which contains the executi...

  • Nathaniel Bibler
    • Tag set to callbacks, feature, patch
    by Nathaniel Bibler at 2:00 PM

    Here's a patch that I think resolves your problem. Pretty simple, actually ...

Thursday, February 26 2009
14 Dynamically set initial state was updated
  • Nathaniel Bibler
    Nathaniel Bibler commented at 12:43 PM

    A prettier version of that patch can be found here: http://github.com/nbibler/aasm/c...

  • Nathaniel Bibler
    • Tag changed from feature to feature, patch
    by Nathaniel Bibler at 12:40 PM

    Here's a patch to add support for this request. Let me know what you think.

  • Nathaniel Bibler
    Nathaniel Bibler created the ticket at 11:16 AM

    Warning: Feature Request. :-D

    I'd like the ability to dynamically assign the initial state of an object instead of strictly assigning it to one specific state.

    ...

Wednesday, February 11 2009
13 Unrecognised option keys should raise an exception was created
  • Zubin
    Zubin created the ticket at 6:01 PM

    Hi Scott,

    Update: It also appears that array values have also been deprecated. eg this no longer works: :enter => [:send_notification, :update_status]

    After upg...

12 The basic README on the github page really sucks was created
  • Donald Piret
    Donald Piret created the ticket at 9:09 AM

    It doesn't show any of the advanced usages with guard methods and transition methods, and these are nowhere documented.

Wednesday, February 04 2009
4 example code fails was updated
  • todd (at snappl)
    todd (at snappl) commented at 2:27 PM

    Sorry, disregard that last comment (at least most of it): @user.pending? .active? etc. are working. I was being stoopid.

    Would still like to see a default colum...

  • todd (at snappl)
    todd (at snappl) commented at 2:19 PM

    Got it. I froze the gem in to vendor/gems and added:

    aasm_column :state

    (surely that's the default)

    to my model. However, @user.current_state does not work, it ...

  • todd (at snappl)
    todd (at snappl) commented at 2:09 PM

    Oh, yeah, forgot, if I add

    aasm_state :pending

    to the User model, nothing happens, same error.

  • todd (at snappl)
    todd (at snappl) commented at 2:04 PM

    I'm getting this as well.

    In my environment.rb:

    require 'aasm'

    Rails::Initializer.run do |config| ... config.gem "rubyist-aasm", :lib => "aasm", :source => "htt...

Thursday, January 29 2009
11 Define state actions as method array was created
  • Kai Schlichting
    Kai Schlichting created the ticket at 5:09 AM

    As I can see, enter and exit actions of a state can be a method as a symbol or a proc. To call several methods in an action, I do the following:

    
      aasm_state...
Tuesday, January 13 2009
10 Stack level too deep w/ railroad was created
  • Jonathan Soeder
    Jonathan Soeder created the ticket at 5:00 PM

    Using the railroad diagram generator in rails projects which rely on AASM throws the following error

    vendor/plugins/aasm/lib/persistence/active_record_persiste...

Tuesday, December 30 2008
bump revision http://github.com/rubyi... was committed by Scott Barron at 9:59 AM
Monday, December 29 2008
Fix misleading example which uses a '... was committed by Scott Barron at 10:05 AM
Wednesday, December 24 2008
bump revs to generate gems http://git... was committed by Scott Barron at 10:22 AM
Typo - rasie => raise http://github.c... was committed by lazyatom at 10:21 AM
Thursday, December 18 2008
9 syntax error in lib/aasm.rb line 124 was created
  • ak
    ak created the ticket at 9:32 AM

    line 124 (rasie):

    def aasm_state_object_for_state(name)

    obj = self.class.aasm_states.find {|s| s == name}
    rasie AASM::UndefinedState, "State :#{name} doesn't e...