#848 open
Peter Ehrlich

ineffective lifeycycle transition

Reported by Peter Ehrlich | November 11th, 2010 @ 03:57 AM | in Hobo 1.1

Transitioning from pending to approved. Submitting the form successfully goes to the controller and '.../:id/approve/ loads displaying "pending". Upon loading the show page, the status has gone back to pending. The redirect does not happen, nor does the block get executed. The :available_to does work properly. The :reject action acts as expected.

lifecycle :state_field => :status do
  state :pending, :approved

  transition :reject, {:pending => :destroy}, :available_to => "User.admin" do 
  end

  transition :approve, {:pending => :approved}, :available_to => "User.admin" do 
  end
end

More context code available upon request. Hobo 1.0.1, Rails 2.3.8, Ruby 1.8.7.

Comments and changes to this ticket

  • Bryan Larsen

    Bryan Larsen November 15th, 2010 @ 06:34 PM

    • Tag changed from bug, lifecycle to defect, lifecycle, needs-test-case

    Given that :reject and :approve look identical, we are going to need that more context. Is there any way you could put a minimal app up on github?

  • Bryan Larsen

    Bryan Larsen November 15th, 2010 @ 06:34 PM

    • State changed from “new” to “open”
    • Milestone set to Hobo 1.1
    • Milestone order changed from “197921” to “0”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

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 ยป

Pages