Skip to content

Instantly share code, notes, and snippets.


Tyler Collier tylercollier

  • Email: github2 at my first and last name dot com
  • Phoenix, AZ, USA
View GitHub Profile
eteubert / wordpress-passwort-reset-unmultisite.php
Last active Oct 10, 2020
Multisite: Passwort Reset on Local Blog
View wordpress-passwort-reset-unmultisite.php
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI:
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI:
* License: MIT
cupakromer / books_controller.rb
Last active May 19, 2020
Rails 4 Standard CRUD Controller
View books_controller.rb
# No flash messages are set with this controller.
# This is a fairly basic / bare controller which does only the basic CRUD.
class BooksController < ApplicationController
respond_to :html, :xml, :json
before_action :set_book, only: [:show, :edit, :update, :destroy]
def index
respond_with @books = Book.all
pehrlich / boolean.rb
Created Feb 15, 2013
Rails Boolean to string yes no
View boolean.rb
class TrueClass
def to_s(style = :boolean)
case style
when :word then 'yes'
when :Word then 'Yes'
when :number then '1'
else 'true'
thechrisoshow / whitelabeling.rb
Created Aug 16, 2011
How should I white label a Rails app?
View whitelabeling.rb
class ApplicationController < ActionController::Base
around_filter :set_white_label
def set_white_label
subdomains = request.subdomains - RESERVED_SUBDOMAINS
if subdomains.empty?
You can’t perform that action at this time.