Skip to content

Instantly share code, notes, and snippets.

Avatar

Trevor Elwell telwell

View GitHub Profile
@telwell
telwell / customize_error.rb
Last active May 26, 2022
Customize Field Errors with Rails 5 and Bootstrap
View customize_error.rb
# 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 Aug 15, 2017
Starter Bootstrap Code
View index.html
<!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">