Skip to content

Instantly share code, notes, and snippets.

View linojon's full-sized avatar

Jonathan Linowes linojon

View GitHub Profile
Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET]
ActionController::RoutingError (No route matches "/default+en.I.js" with {:request_uri=>"/default+en.I.js", :domain=>"reviewramp.com", :method=>:get, :port=>80, :content_type=>nil, :protocol=>"http://", :remote_ip=>"67.45.129.217", :subdomain=>"", :accepts=>"text/html,application/xml,*/*"}):
Rendering rescues/layout (not_found)
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET]
Permission denied to...a non-chrome context19(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression:
$('#flash').animate(
{backgroundColor: '#ffff00'}, 'normal', 'linear',
function(){
$(this).animate(
{backgroundColor: '#00ff00'}, 'normal', 'linear',
function(){
$(this).animate(
{backgroundColor: '#0000ff'}, 'normal', 'linear',
function(){
$(this).animate(
LocalJumpError in Subscriptions#credit_card
Showing app/views/subscriptions/credit_card.html.erb where line #25 raised:
no block given
Extracted source (around line #25):
23: <%= label_content 'Card expires on:' %>
# code borrowed error_messages_for
def error_counts_for(*params)
#debugger
options = params.extract_options!.symbolize_keys
if object = options.delete(:object)
objects = [object].flatten
else
objects = params.collect {|object_name| instance_variable_get("@#{object_name}") }.compact
end
#count = objects.inject(0) {|sum, object| sum + (object.errors.count.zero? ? 0 : 1) }
@linojon
linojon / gist:189671
Created September 20, 2009 02:03
code snippets used in the AuthApp screencast
# File: features/support/path.rb
when /login/
login_path
when /signup/
signup_path
# File: features/support/user_helpers.rb
module UserHelpers
def create_user( options = {} )
args = {
@linojon
linojon / gist:189670
Created September 20, 2009 01:46
code snippets used in the SaasRamp screencast
# Some handy code snippets are used in the SaasRamp screencast (http://www.vaporbase.com/postings/SaasRamp_Screencast)
# File: environment.rb
config.gem 'activemerchant', :lib => 'active_merchant'
config.gem 'money'
config.gem 'state_machine'
config.gem 'lockfile'
config.active_record.observers = :subscription_observer
def is_due?
return true if past_due?
if next_renewal_on <= Time.zone.today
past_due!
end
past_due?
end
# This is an extension to ActiveMerchant to make the CIM gateway look a little more like the other gateways that
# support recurring billing. I wrote this code for the SaaS Rails Kit (http://railskits.com/saas), so if you are
# looking for a billing solution for your Rails application, feel free to check it out. :)
require 'digest/sha1'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class AuthorizeNetCimGateway < Gateway
## gem file bogus.rb
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
# Bogus Gateway
class BogusGateway < Gateway
AUTHORIZATION = '53433'
SUCCESS_MESSAGE = "Bogus Gateway: Forced success"
...