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
| <%= Group.timespan_filter(@range).count :conditions => :etc %> |
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
| require 'httparty' | |
| require 'rack' | |
| class Rack::Validate | |
| attr_reader :app, :options | |
| def initialize(app, options={}) | |
| @app = app | |
| @options = options |
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
| [["201", "hurl", "http://hurl.r09.railsrumble.com"], ["734m", "LAZEROIDS!", "http://lazeroids.r09.railsrumble.com"], ["a-coders-diarrhea", "idealist", "http://idealist.r09.railsrumble.com"], ["aaron-longwell", "The Line Diet", "http://linediet.r09.railsrumble.com"], ["acts_as_ninjas", "Bartender Cocktail Recipies", "http://bartender.r09.railsrumble.com"], ["agile-bastards", "Everybody Loves Beer", "http://lovesbeer.r09.railsrumble.com"], ["agile-nomads", "PeepNote", "http://peepnote.r09.railsrumble.com"], ["agilitic-featuring-meboo", "PingMyRide", "http://agilitic.r09.railsrumble.com"], ["allcaps", "Decaf Sucks", "http://allcaps.r09.railsrumble.com"], ["andrew", "Rostered", "http://rostered.r09.railsrumble.com"], ["antga-me", "antga.me", "http://antgame.r09.railsrumble.com"], ["awesome", "Twt App", "http://valuable.r09.railsrumble.com"], ["bendyworks", "Yield the Floor", "http://yieldthefloor.r09.railsrumble.com"], ["big-bad-machine", "Twitter Competition Manager", "http://roundem.r09.railsrumble.com"], ["big |
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
| api_key.txt |
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 MoveToParanoid < ActiveRecord::Migration | |
| def self.up | |
| classes_with_active = Dir['app/models/*'].collect do |f,o| | |
| n = File.basename(f,'.rb') | |
| m = n.classify.constantize | |
| if m.respond_to?('column_names') | |
| m.reset_column_information | |
| m.column_names.include?('active') and m | |
| end or nil | |
| end.compact |
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
| var Base = {}; | |
| // register a variable for use within the Base namespace | |
| // there is an optional scope | |
| // You may want to use the +js_var+ helper found in javascript_helper.rb | |
| Base.register_variable = function(key, value, scope) { | |
| if (scope) { | |
| if (typeof Base[scope] === "undefined") Base[scope] = {}; | |
| Base[scope][key] = value; | |
| } else { |
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
| <style type="text/css"> | |
| .js .jshide{ display: none; } | |
| </style> | |
| <script type="text/javascript"> | |
| document.getElementsByTagName('html')[0].className += 'js'; | |
| </script> |
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
| module IncrementifyString | |
| # Helps create a user friendly unique string | |
| # For example, calling incrementify_string! repeatedly starting with | |
| # 'string' would yield: | |
| # 'string' => 'string1' => 'string2' => 'string3' ... 'string9' => 'string10' => 'string11' ... etc | |
| def incrementify_string!(bar) | |
| if bar.match(/[0-8]$/) | |
| bar.succ! # this is faster than regex parse and to_i + 1 to_s | |
| elsif bar.ends_with?('9') | |
| m = bar.match(/(\d+)$/) |
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
| Base.initializers = {}; | |
| Base.init = function() { | |
| if (arguments.length == 1) { | |
| var to_init = arguments[0], | |
| scope = $(to_init).not('.initialized').addClass('initialized'); | |
| $.each(Base.initializers[to_init], function(i, f) { f.apply(scope); }); | |
| } else { |
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
| Then /^I should see :"([^\"]*)"$/ do |text| | |
| assert_contain I18n.t(text) | |
| end |