Skip to content

Instantly share code, notes, and snippets.

Nadia Odunayo nodunayo

Block or report user

Report or block nodunayo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View filter_by_genre_spec.rb
require 'rails_helper'
RSpec.describe "Filter TBR by genre", js: true do
context "when the user has books on their TBR" do
let(:user) { create(:user) }
let(:historical_fiction) { create(:genre, name: 'historical fiction') }
let(:thriller) { create(:genre, name: 'thriller') }
let(:historical_fiction_book) { create(:book, title: "Historical Fiction Book") }
let(:thriller_book) { create(:book, title: "Thriller Book") }
@nodunayo
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
<<-VERSE
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.
VERSE
elsif number == 1
<<-VERSE
1 bottle of beer on the wall, 1 bottle of beer.
@nodunayo
nodunayo / README.md
Last active Dec 2, 2018 — forked from zenorocha/README.md
A template for a code hospitable README
View README.md

Code Hospitality Guide App

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

Installation

  • Go to the Code Hospitality homepage
  • Click the 'DOWNLOAD RIGHT NOW' button
  • Twiddle thumbs
  • Enjoy
@nodunayo
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>
<ul>
<% @item.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
You can’t perform that action at this time.