Oct 03, 2008 @ 05:39 pm

Pretty easy stuff today, but this is not something you may need to do often so maybe you don’t know how to do it.
Say I have these 2 arrays :
colors1 = [:blue, :red, :green, :orange, :purple]
colors2 = [:yellow, :cyan, :green, :blue, :purple]
Now what if I want a new array that contains only the elements present [...]

Posted under : short & sweet
Sep 10, 2008 @ 11:54 am

acts_as_state_machine is a great plugin really useful when you want to add constraints and behavior to your model objects.
Note : Those who don’t know what this plugin is all about should stop reading right there or risk being completely lost.
One thing that seems impossible to do with the plugin is to have variable “initial states” [...]

Posted under : short & sweet