Public Gists by dpickett

Gravatar
Tue Oct 13 17:49:24 -0700 2009
1
2
3
module DatepickerHelper
  def datepicker(f, field, options = {})
    options[:input_html] ||= {}
Gravatar
Thu Sep 17 14:18:59 -0700 2009
1
2
3
Have you ever wanted to contribute back to Rails? Since our first event in August was such a success, RailsBridge and the Rails Core team will run our next BugMash on September 26th and 27th. For those of you that didn’t participate last month, all are welcomed and encouraged to participate.
 
For those of you unfamiliar with the Bugmash, it’s very similar to the Rails Hackfests (http://www.workingwithrails.com/hackfest) that were held in 2007 and 2008. Basically, the idea is to reduce the amount of open tickets in the Rails Core Issue Tracker (https://rails.lighthouseapp.com/dashboard), to encourage more people to get involved with the Rails Source, and to have some fun.
Gravatar
Sun Sep 13 16:22:29 -0700 2009
1
2
3
# -*- ruby -*-
 
# NOTE Copy this to your home folder as .autotest
Gravatar
Sun Aug 23 11:22:11 -0700 2009
1
2
3
  config.gem 'justinfrench-formtastic', :lib => 'formtastic'
  config.gem 'josevalim-inherited_resources', :lib => 'inherited_resources'
  config.gem 'binarylogic-searchlogic', :lib => 'searchlogic'
Gravatar
Fri Aug 14 11:42:25 -0700 2009
1
2
3
Given there is a user named "Bob"
And Bob
"""
Gravatar
Tue Aug 04 17:39:25 -0700 2009
1
2
3
    Given
      """
      @origin = TollBooth::Location.new("4 Yawkey Way, Boston, MA")
Gravatar
Tue Jun 30 17:09:36 -0700 2009
1
2
3
function bindFbAvatars(){
  var uid_class_regex = /uid_(\S*)/
  var i = 0;
Gravatar
Fri May 01 10:32:37 -0700 2009
1
2
3
Dan Pickett, http://en.oreilly.com/rails2009/profile/46469
Brian Cardarella, http://en.oreilly.com/rails2009/profile/45790
Nick Plante, http://en.oreilly.com/rails2009/profile/2753
Gravatar
Wed Mar 11 12:59:20 -0700 2009
1
2
3
 def method_missing(name, *args)
      if current_state.events(name)
        process_event!(name, *args)
Gravatar
Mon Dec 15 11:49:59 -0800 2008
1
2
3
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
 
class FooHelperTest < ActionView::TestCase
Gravatar
Fri Dec 12 13:59:30 -0800 2008
1
2
3
module FindBySqlHater
  def find_by_sql(*args)
    raise "wtf are you thinking?!? use find k thx"
Gravatar
Thu Dec 11 07:07:29 -0800 2008
1
2
3
class ActionView::TestCase
  class TestController < ActionController::Base
    attr_accessor :request, :response, :params
Gravatar
Thu Dec 11 06:12:05 -0800 2008
1
2
3
class ActionView::TestCase
  # Enable UrlWriter when testing helpers
  include ActionController::UrlWriter
Gravatar
Fri Nov 21 12:40:48 -0800 2008
1
2
  is_indexed if false
  include Dxj::SearchSubject
Gravatar
Fri Nov 21 12:36:24 -0800 2008
1
2
3
class Condition < ActiveRecord::Base
  include Dxj::SearchSubject
  
Gravatar
Fri Nov 21 12:11:01 -0800 2008
1
2
3
 Dir.chdir "#{RAILS_ROOT}/app/models/" do
          Dir["**/*.rb"].each do |filename|
            open(filename) do |file|
Gravatar
Fri Nov 21 12:10:18 -0800 2008
1
2
3
 Dir.chdir "#{RAILS_ROOT}/app/models/" do
          Dir["**/*.rb"].each do |filename|
            open(filename) do |file|
Gravatar
Sun Oct 19 00:02:02 -0700 2008
1
2
3
  def get_random_troggle_image(options = {})
    image_tag(get_random_troggle_image_path, {:class => "troggle"}.options)
  end
Gravatar
Sat Oct 18 23:30:34 -0700 2008
1
2
3
<div class="not_found">
<img src="/images/not_found_overlay.png" alt="Not found dude"/>
<img src="/images/troggles/eddie.png" alt="" />
Gravatar
Sat Oct 18 12:25:31 -0700 2008
1
2
3
<script type="text/javascript" charset="utf-8">
  var search_constant = "Enter a diagnosis name ...";
  function setSearchConstant(){