My Recent Pastes (10 and counting)
Pastes by antares (10 and counting)
Below are the 10 most recent pasties by antares.
May 22, 2008
6:34PM EDT
by antares
View all 19 lines
class Company include DataMapper::Resource property :id, Integer, :serial => true property :name, String, :nullable => false
May 16, 2008
7:33PM EDT
by antares
View all 16 lines
it "allows wrapping of nested routes all having shared argument with PREDEFINED VALUES" do Merb::Router.prepare do |r| r.match(/\/?(en|es|fr|be|nl)?/).to(:language => "[1]") do |l| l.match("/guides/:action/:id").to(:controller => "tour_guides") end
May 16, 2008
7:26PM EDT
by antares
View all 18 lines
A route derived from the blocks of #match - should inherit the :controller option. - should inherit the :action option. - should inherit the default :action of 'index' - should make use of the :params option
May 16, 2008
7:25PM EDT
by antares
View all 44 lines
it "allows wrapping of nested routes all having shared argument" do Merb::Router.prepare do |r| r.match('/:language') do |i18n| i18n.match!('/:controller/:action') end
May 16, 2008
7:18PM EDT
by antares
View all 19 lines
it "allows wrapping of nested routes all having shared OPTIONAL argument" do Merb::Router.prepare do |r| r.match(/\/(.*)?/).to(:language => "[1]") do |l| l.match("/guides/:action/:id").to(:controller => "tour_guides") end
May 10, 2008
3:00PM EDT
by antares
View all 21 lines
require "rubygems" require "data_mapper" DataMapper.setup(:backup, { :adapter => "postgres",
May 06, 2008
4:08AM EDT
by antares
display @obj, :include => [:beer, :jazz], :except => [:idiots]
May 06, 2008
4:05AM EDT
by antares
display :only => [:lat, :lng] do # some heavy lifting calculating the entity detouched from controller # then calls to_json, for instance, on calculated result end
May 05, 2008
5:54PM EDT
by antares
View all 11 lines
namespace :deploy do desc <<-DESC Deploys your project. This calls both `update' and `restart'. Note that \ this will generally only work for applications that have already been deployed \ once. For a "cold" deploy, you'll want to take a look at the `deploy:cold' \
