Skip to content

Instantly share code, notes, and snippets.

nodunayo / bottles.rb
Last active Aug 31, 2016
A race to green for the 99 Bottles Kata
View bottles.rb
class Bottles
def verse(number)
if number == 2
2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.
elsif number == 1
1 bottle of beer on the wall, 1 bottle of beer.
nodunayo /
Last active Dec 2, 2018 — forked from zenorocha/
A template for a code hospitable README

Code Hospitality Guide App

This app helps you transform your team and codebase into code hospitable entities.


  • Go to the Code Hospitality homepage
  • Click the 'DOWNLOAD RIGHT NOW' button
  • Twiddle thumbs
  • Enjoy
nodunayo / rails_errors
Created Dec 25, 2013
Rails error message notifications
View rails_errors
#place immediately under 'form_for' line
<% if @item.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@item.errors.count, "error") %> prohibited this item from being saved:</h2>
<% @item.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>