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
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /usr/www/users/sarahw/blog/wp-includes/media.php on line 1006 | |
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /usr/www/users/sarahw/blog/wp-includes/media.php on line 424 | |
Warning: imagejpeg(): supplied argument is not a valid Image resource in /usr/www/users/sarahw/blog/wp-includes/media.php on line 455 |
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
def link_to( *args, &block ) | |
title_object = args.first if args.first.is_a?( ActiveRecord::Base ) | |
if title_object && ( args.size == 1 || ( args.size == 2 and args.last.is_a?(Hash) ) ) | |
args.insert( 1, polymorphic_url( title_object ) ) | |
end | |
options = args.get_or_initialize_options! | |
title_object ||= args.second if Rails.env != 'test' && args.second.is_a?( ActiveRecord::Base ) | |
if !options[:title].blank? | |
options[:title] = options[:title].to_s | |
elsif title_object |
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 'rexml/document' | |
module ActiveMerchant #:nodoc: | |
module Billing #:nodoc: | |
# Paygate is one of the leading CC gateways in South Africa | |
# see http://www.paygate.co.za | |
# Contributed by Nick Coyne (http://www.codevader.com) | |
class PaygateGateway < Gateway | |
URL = 'https://www.paygate.co.za/payxml/process.trans' |
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
# download and git methods swiped from http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb | |
require 'open-uri' | |
def download(from, to = from.split("/").last) | |
#run "curl -s -L #{from} > #{to}" | |
file to, open(from).read | |
rescue | |
puts "Can't get #{from} - Internet down?" | |
exit! |
NewerOlder