Check out our README to find out about us and our Code of Conduct.

June 2013 Meeting

Meeting Sponsors

Sponsorship kindly provided by:

Hosted By

Skills Matter


The June 2013 meeting of LRUG will be on Monday the 10th of June, from 6:30pm to 8:00pm. Our hosts Skills Matter will be providing the space, at their offices on Goswell Road; The Skills Matter eXchange. Registration details are given below.


State Transitions Are People Too

JB Steadman says:

In this talk I present a simple ActiveRecord-based alternative to the many popular state machine gems.

Suppose you're dealing with a school application system. Applications can be submitted, rejected, approved. Then you would have

class Submission < StateTransition end

and so on. StateTransition is an STI subclass of ActiveRecord::Base.

Inside each 'concrete' transition subclass, AR validations determine whether the transition can be created, given current system state. Callbacks make changes to other models that result from the transitions, as well as trigger other effects like emails.

This shifts emphasis from the models to the transitions themselves. Model classes don't get cluttered with logic related to multiple transitions - that logic lives in the transition classes. It works nicely with REST. You are literally creating an Approval, rather than "approving". Logging of transitions is front and center. Nobody has to learn a new lib and you're never beholden to yesteryear's state machine gem-of-the-month.

JB originally proposed this talk for Ruby Manor 4 and you can read more about his proposal on vestibule

Application Example based on public code

Jairo Diaz says:

This talk describes an experience of reusing the public code available from the GOV.UK project. It shows how we can implement custom customer service flows based on the SmartAnswers project.


We'll finish the formal talk-based part of the meeting at about 8pm and start the informal pub-based part about 5 minutes later in The Slaughtered Lamb. If you can't make the talks, do come along just for the pub, someone can get you caught up on what happened and no-one will know you weren't there!


Also, the nice folks at Yammer are putting some money behind the bar to provide some drinks for us, so there are even more reasons to make it along!


To secure a place at the meeting you must register with our hosts Skills Matter. It helps to make sure we have the room laid out with enough chairs, and in extreme cases that we get priority on the larger rooms over other groups using the space on the same night. Also, it's polite (don't forget MINASWAN), so please do register with Skills Matter.

You can also follow this meeting on lanyrd, but this is not a meaningful way to tell Skills Matter you wish to attend. It's just for the lols, innit?

Posted by Murray Steele on May 25, 2013