Custom helper methods of State Machine (ruby) by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

I have a lot of code in my project like the following:

class Animal < ActiveRecord::Base
  state_machine do
    around_transition :on => :sure do |animal, _, block|
      animal.transaction do
        block.call
        animal.do_things_on_sure
      end
    end
  end
end

around_transition looks ugly and repeats for many classes.. Lets refactor it. More under the cut

Using chruby and ruby-build to Manage Ruby Installations by dunsmoreb

90a1e75998085d4270b41bc7192886dc?size=52

RVM has been the traditional choice of #ruby management for years.

Such a heavyweight isn't always required though and a lighter alternative is desirable. We can achieve this setup with the tools chruby and ruby-build.

With chruby we can manage multiple Ruby versions; ruby-build allows us to install multiple Ruby versions.

content_tag and helpers (rails) by sebkomianos

B130aa7ae93d8ea344146795da430cef?size=52

I am trying to create a calendar table to display the daily availability of every staff member of a company. What I think I need is a header with the days of the month and then a row (with as many cells as the number of the days) for each staff member. The different background color of each cell will represent a different availability status and the staff members change so I want all this to be dynamically generated. Click for More!