Skip to content

Instantly share code, notes, and snippets.

View benvds's full-sized avatar
😀

Ben van de Sande benvds

😀
View GitHub Profile
@benvds
benvds / disable autocomplete for textfields with class "autocomplete-off" with jQuery
Created August 25, 2009 18:35
disable autocomplete for textfields with class "autocomplete-off" using jQuery
//
// <input type="text" class="autocomplete-off" />
//
$(function(){
$('.autocomplete-off').attr('autocomplete', 'off');
});
@benvds
benvds / gist:170983
Created August 20, 2009 10:58
formtastic stylesheet changes to place input fields beneath labels
/* @override http://localhost:3000/stylesheets/formtastic_changes.css */
form.formtastic > li {
list-style: none;
margin: 0 0 1em 0;
}
form.formtastic > li > label {
display: block;
}
# .gitignore for rails projects
config/database.yml
*~
*.cache
*.log
*.pid
tmp/**/*
.DS\_Store
db/cstore/**
# customer.rb
class Customer < ActiveRecord::Base
validates_presence_of :first_name
end
# customer_test.rb
require 'test_helper'
class CustomerTest < ActiveSupport::TestCase
should_validate_presence_of :first_name
end