Skip to content

Instantly share code, notes, and snippets.

@SaladFork
SaladFork / bootstrap4_breadcrumbs_builder.rb
Last active July 25, 2019 22:23
`breadcrumbs_on_rails` builder with Bootstrap 4 compatible output
# `Bootstrap4BreadcrumbsBuilder `is a Bootstrap 4 (alpha6) compatible breadcrumb
# builder. It is designed to work with the `breadcrumbs_on_rails` gem as a
# drop-in builder replacement.
#
# Bootstrap4BreadcrumbsBuilder accepts a limited set of options:
#
# | option | default | description |
# | ---------------- | ------- | ------------------------------------------ |
# | `:container_tag` | `:ol` | What tag to use for the list container |
# | `:tag` | `:li` | What HTML tag to use for breadcrumb items |
@nizaroni
nizaroni / projects.md
Last active October 29, 2020 13:44
Ironhack Final Project Guide

Ironhack Final Project Guide

For your Ironhack final project, you have 2 weeks to develop an idea of your choice. You will present your final project at the Hackshow.

This document contains all the relevant information pertaining to the final project phase of the course. Let's start with some basic facts to keep in mind.

@clamstew
clamstew / polymorphic_associations.md
Last active February 18, 2022 13:18
A blog post on polymorphic associations. By @clamstew and @truffaut

Why Polymorphic Associations:

This was a question from @photonerddan during class, and after looking through many examples online approaching it from an inheritance stance, as well as ones with examples that seemed outside of common use-cases, Mike and I decided to approach it from a problem / solution standpoint, which looks at it from a database perspective.

We will cover it more in-depth during the second week of Rails MakerSquare, but for now here is a short example to highlight the problem that polymorphism is solving in your database.

So let's start with the problem it is solving:

Polymorphism keeps you from having excessive foreign key columns in a database table where multiple things, such as notification feed items, are owned by other objects.

@troelskn
troelskn / link_user.html.erb
Last active November 13, 2017 11:06
Extend http://railscasts.com/episodes/235-devise-and-omniauth-revised to support scenario where a user first creates account without Facebook login, then later authenticates with Facebook.