Skip to content

Instantly share code, notes, and snippets.

View telwell's full-sized avatar

Trevor Elwell telwell

View GitHub Profile
@telwell
telwell / customize_error.rb
Last active May 18, 2023 16:54
Customize Field Errors with Rails 5 and Bootstrap
# Adapted from https://rubyplus.com/articles/3401-Customize-Field-Error-in-Rails-5
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = ''
form_fields = [
'textarea',
'input',
'select'
]
@telwell
telwell / index.html
Created August 15, 2017 22:47
Starter Bootstrap Code
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/styles.css">
<title>Trevor Elwell's Website</title>
</head>
<body class="container-fluid">
<div class="row justify-content-center">