Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 2cbed89f1c
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (38 sloc) 1.048 kB
#!/usr/local/bin/ruby
$: << '.'
require 'rubygems'
require 'camping'
require 'rack'
Camping.goes :Cse
::SE_TEST_FRAMEWORK='camping'
require 'datamapper_setup'
require 'active_record_setup'
require 'sequel_setup'
require 'se_setup'
ScaffoldingExtensions.javascript_library = 'Prototype'
module Cse
module Controllers
class ActiveRecord < scaffold_R("/active_record")
scaffold ArOfficer
scaffold ArMeeting
scaffold_all_models :only=>[ArEmployee, ArGroup, ArPosition]
end
class Sequel < scaffold_R("/sequel")
scaffold SqOfficer
scaffold SqMeeting
scaffold_all_models :only=>[SqEmployee, SqGroup, SqPosition]
end
class Datamapper < scaffold_R("/datamapper")
add_scaffolding_methods [DmOfficer, DmMeeting, DmEmployee, DmGroup, DmPosition]
scaffold DmOfficer
scaffold DmMeeting
scaffold_all_models :only=>[DmEmployee, DmGroup, DmPosition]
end
end
def service(*args)
r = super(*args)
ActiveRecord::Base.clear_active_connections!
r
end
end
run Cse
Jump to Line
Something went wrong with that request. Please try again.