This file contains 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
# Add this to your test_helper.rb to autoload Shoulda macros in bundled Gems. | |
Shoulda.autoload_macros('',*Gem.loaded_specs.values.map(&:full_gem_path)) |
This file contains 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
jQuery(function($) { | |
// Fallback functionality for HTML5 input placeholder text | |
if (document.createElement('input').placeholder === undefined) { | |
$('input[placeholder]').prompted_text_input().blur(); | |
} | |
}); |
This file contains 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
#------------------------------------------------------------ | |
# GoToBilling Ruby on Rails Plugin v1.0 | |
# Compatible with version 3.0.2 of the GoToBilling Gateway | |
#------------------------------------------------------------ | |
require 'net/http' | |
require 'net/https' | |
require 'cgi' | |
module GoToBillingLibrary |
This file contains 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
12:06:35am [andrew@mbp]:code | |
$ cd my_project/ | |
=============================================================== | |
= NOTICE: = | |
=============================================================== | |
= RVM has encountered a not yet trusted .rvmrc file in the = | |
= current working directory which may contain nasty code. = | |
= = | |
= Examine the contents of this file to be sure the contents = |
This file contains 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 Example < ActiveRecord::Base | |
set_table_name 'legacy_somethings' | |
end |
This file contains 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
# == Schema Information | |
# | |
# Table name: posts | |
# | |
# id :integer not null, primary key | |
# title :string(255) | |
# content :text | |
# user_id :integer | |
# slug :string(255) | |
# created_at :datetime |
This file contains 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
<%= notice %> | |
<%= render 'form' %> |
This file contains 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 Activity < ActiveRecord::Base | |
belongs_to :actor, polymorphic: true | |
belongs_to :thing, polymorphic: true | |
belongs_to :target, polymorphic: true | |
def self.polywhere(opts) | |
t = arel_table | |
ands = opts.map do |assoc, obj| | |
left_eq = t["#{assoc}_id"].eq(obj.id) | |
right_eq = t["#{assoc}_type"].eq(obj.class.model_name) |
This file contains 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
Pod::Spec.new do |s| | |
s.name = 'TestFlightSDK' | |
s.version = '2.0.2-beta' | |
s.license = { | |
:type => 'Commercial', | |
:text => <<-LICENSE | |
All text and design is copyright © 2010-2013 TestFlight App, Inc. | |
All rights reserved. |
This file contains 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
{ | |
"$schema": "http://interagent.github.io/interagent-hyper-schema", | |
"definitions": { | |
"account-feature": { | |
"description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.", | |
"$schema": "http://json-schema.org/draft-04/hyper-schema", | |
"stability": "production", | |
"strictProperties": true, | |
"title": "Heroku Platform API - Account Feature", | |
"type": [ |
OlderNewer