This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClassWithAttr | |
def self.my_attr_accessor(attr_name) | |
define_method("#{attr_name}=") do |arg| | |
instance_variable_set("@#{attr_name}", arg) | |
end | |
define_method(attr_name) do | |
instance_variable_get("@#{attr_name}") | |
end | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m = mail(:to => "[email protected]", :from => "[email protected]", :body => "fail", :subject => "yeah") | |
m['X-Custom-Thing'] = whatever |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page.insert_html(:top, :phaseslist , sortable_element('phaseslist', :url => sort_projects_path, :handle => 'handle'), :partial => "project_phase", :object => @project_phase) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# things.rb - a superfun time library | |
# | |
# Author: Jeremy McAnally 1998-2010 | |
# | |
# Documentation: Mr. Jeremy McAnally | |
# | |
#-- | |
# $Id: things.rb,v 2.22 2009-01-17 20:16:31+09 tadf Exp $ | |
#++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Outlay < ActiveRecord::Base | |
def self.budget(scopes = {}, pivot_value = nil) | |
pivot_value ||= "top_10_competitors" | |
projection_value = {}.tap do |projection| | |
pvs = Outlay.pivot_values(pivot_value, scopes) | |
pvs.each do |pivot| | |
projection[pivot] = {} | |
pivot_scopes = ({(pivot_value=="top_10_competitors" ? "contractor" : pivot_value) => pivot}.merge(scopes)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01. | |
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alloy:remix alloy$ rake db:create | |
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info | |
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _mysql_get_client_info | |
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle | |
Expected in: flat namespace | |
Trace/BPT trap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUBY HOEDOWN 2011 | |
Day 1 | |
----- | |
8:00 - Registration opens | |
9:00 - Kickoff with The Improv Effect | |
10:00 - TorqueBox: A True Application Server for Ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
module UniTest | |
class <<self | |
attr_accessor :test_cases | |
end | |
def self.run_tests | |
tc_instances = (test_cases || []).map {|tc| tc.new} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid_1 { | |
width: 80px; | |
} | |
.grid_2 { | |
width: 180px; | |
} | |
.grid_3 { | |
width: 280px; |