Skip to content

Instantly share code, notes, and snippets.

.....
# create a transaction which records the details of the notification
object.txns.create(:transaction_id => ipn.transaction_id,
:amount => ipn.gross,
:fee => ipn.fee,
:currency_type => ipn.currency,
:status => ipn.status,
:received_at => ipn.received_at)
# if ipn.acknowledge
ack = nil
Ok, so I finally fixed the pagination thing, actually this is working for me with mephisto 0.8.2 (using several different themes - skittlish, simpla, metatheme - but that would not make any difference).
Here are the steps I've used to fixed pagination thanks to the blog post you can find at this address (FIRS THING FIRST, you have to follow the guidelines on that blog post to fix the pagination and total pages issue!!!)
http://railstalk.com/2009/8/12/setting-up-mephisto-articles-pagination
Then you can come back here and go on reading through my post.
This way I am achieving pagination on several blog categories on my website: I have setup my sections this way (note that I am using several "single" pages in my website such as Home, about us, contact etc etc...) but of course here we need pagination for blog sections that should be configured this way:
@yortz
yortz / Capfile.rb
Created October 19, 2009 15:02 — forked from roidrage/Capfile.rb
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "host.name"
set :domain, "host.name"
set :repository, "git@github.com:user/jekyll-blog.git"
set :use_sudo, false
set :deploy_to, "/var/www/#{application}"
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
@yortz
yortz / Rakefile
Created October 19, 2009 15:02 — forked from jlong/Rakefile
require 'active_support'
def ok_failed(condition)
if (condition)
puts "OK"
else
puts "FAILED"
end
end
set :user, "deploy"
set :deploy_to, "/usr/local/www/nb_blog_jekyll"
set :jekyll_command, "/usr/local/jekyll/bin/jekyll --lsi"
role :web, "blog.new-bamboo.co.uk"
task :deploy do
run "cd #{deploy_to}; git pull; #{jekyll_command}; exit 0"
end
@yortz
yortz / gist:258928
Created December 17, 2009 18:43 — forked from mrichman/gist:118095
Cucumber is a Integration test harness, so your features should be
specifying who can authenticate via what URLs and your steps should be
exercising the controllers an filters that enforce those features.
The point being, you should be going through your views and hitting
the database, checking to see if the http response body contains what
you expect to see and not worrying about directly testing authlogic
itself.
# Authentication.feature
#!/usr/bin/env ruby
# Written by Kieran P
# http://github.com/KieranP
# http://twitter.com/k776
# http://k776.tumblr.com
#
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
#!/usr/bin/env ruby
# Written by Kieran P
# http://github.com/KieranP
# http://twitter.com/k776
# http://k776.tumblr.com
#
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
#!/usr/bin/env ruby
# Written by Kieran P
# http://github.com/KieranP
# http://twitter.com/k776
# http://k776.tumblr.com
#
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
require 'rack/test'
require 'webrat'
require File.expand_path(File.dirname(__FILE__) + '/../../lib/stats')
Webrat.configure do |config|
config.mode = :rack
end
Stats::App.set :environment, 'cucumber'
Stats::App.enable :raise_errors