Skip to content

Instantly share code, notes, and snippets.

View piclez's full-sized avatar

Peter WD piclez

View GitHub Profile
Merb::Router.prepare do |r|
#Merbauth routes is broken (capture is depricated)
slice(:MerbAuth, :path => "", :default_routes => false)
# This is the default route for /:controller/:action/:id
# This is fine for most cases. If you're heavily using resource-based
# routes, you may want to comment/remove this line to prevent
# clients from calling your create or destroy actions with a GET
default_routes
MODEL:
class Gallery
include DataMapper::Resource
belongs_to :user
has n, :photos
def thumbnail
"1"
end
throw :halt, Proc.new { |controller|
@user = params[:login]
render(:index_not_logged_in)
} if !current_user
#!/usr/bin/env ruby -w
# This should be run through './script/runner'
options = YAML.load($stdin.read)
demo = Demo.find(options[:demo])
runner = Outback::Runner.new
runner.manager = demo.manager
We couldn’t find that file to show.