Public Gists by tomafro

Gravatar
Wed Nov 18 04:36:30 -0800 2009
1
2
3
jermey.davis
birdie.zboncak
duane.bradtke
Gravatar
Thu Oct 15 02:36:07 -0700 2009
1
2
3
From:
 
Then /^the "([^\"]*)" checkbox should be checked$/ do |label|
Gravatar
Tue Oct 13 03:51:40 -0700 2009
1
2
3
Before:
 
<ul class="actions">
Gravatar
Tue Sep 22 09:00:53 -0700 2009
1
2
3
attachments: parent_id, asset_id
domain_names: organisation_id
event_memberships: user_id, event_id
Gravatar
Thu Aug 13 10:17:25 -0700 2009
1
2
3
#compdef gem
 
# My first zsh completion function, for the gem command. It lets you type 'gem <tab>' to complete gem commands
Gravatar
Tue Aug 04 01:13:24 -0700 2009
1
2
3
# 9 out of 10 microbenchmarks agree: implicit return smokes explicit return
require 'benchmark'
 
Gravatar
Tue Jun 23 02:28:22 -0700 2009
1
2
class Account < ActiveRecord::Base
end
Gravatar
Tue Jun 23 01:23:44 -0700 2009
1
2
3
# Is this crazy?
 
class AccountRole < ActiveRecord::Base
Gravatar
Fri May 22 06:19:09 -0700 2009
1
2
3
remove_constant(:JavaScriptHelper)
Kernel.expects(:require).with('action_view/helpers/javascript_helper')
JavaScriptHelper
Gravatar
Mon Nov 24 02:33:31 -0800 2008
1
2
3
module ColumnReader
  def column_reader(column_name, options = {})
    name = options.delete(:as) || column_name.to_s.pluralize
Gravatar
Tue Sep 02 02:01:18 -0700 2008
1
2
3
# I hear that aliasing lambda is bad, but this is
# much more readable...
 
gist: 5024 Get scoped object ids witho...
Gravatar
Tue Aug 12 02:32:02 -0700 2008
1
2
3
class Animal < ActiveRecord::Base
  named_scope :with_wings, :conditions => {:wings => true}
  named_scope :with_four_legs, :conditions => {:legs => 4}
Gravatar
Thu Jul 31 11:01:49 -0700 2008
1
2
3
ActiveRecord::Schema.define(:version => 0) do
  create_table :books do |books|
    books.column :title, :string