An incomplete cheatsheet for rails 3. Things are added as they are required.
# http://guides.rubyonrails.org/active_record_validations_callbacks.html
class SomeClass < ActiveRecord::Base
# length
# Amadeusz Juskowiak <amadeusz@amanointeractive.com> 2012 - MIT License | |
# 1. Put inside helpers do .. end | |
# 2. Set CACHE_DIR to somewhere writable and private (like CACHE_DIR=File.dirname(__FILE__) + '/tmp' | |
# 3. Use it! You can use fragment_expire to remove cache with given name. | |
# | |
# Example: | |
# %h1 foo | |
# = cache_fragment(:report, 300) do | |
# - data = get_data_slowly |
COUNTRIES = [ | |
"Afghanistan", | |
"Aland Islands", | |
"Albania", | |
"Algeria", | |
"American Samoa", | |
"Andorra", | |
"Angola", | |
"Anguilla", | |
"Antarctica", |