hoodwink.d enhanced

Wed Jul 23

Tip Butterfly needle

If giving blood makes you light headed or even pass out, ask that a butterfly needle be used rather than a straight needle.

Gaspanic

Gas Panic

Being an intellectual means more than doing your homework.

William Deresiewicz

The Johnny Cash Lawsuit Song

Gorky’s Zygotic Mynci

There are two types of programming languages: the ones that people bitch about and the ones that no one uses.

Bjarne Stroustrup

More REST/CRUD conventions

class ApplicationController < ActionController::Base def self.set_resource(resource, &custom_setter) filter_name = :"set_#{resource}" before_filter filter_name, :only => [:show, :edit, :update, :destroy] if custom_setter define_method(filter_name) do custom_setter.call(resource) end else define_method(filter_name) do instance_variable_set( "@#{resource}", resource.to_s.classify.find(params[:id]) ) end end end def self.default_formats_for(data) respond_to do |format| format.html format.xml { render :xml => data } end end end class AccountsController < ApplicationController set_resource :account def index @accounts = Account.all default_formats_for @accounts end def show default_formats_for @account end end