Skip to content

Instantly share code, notes, and snippets.

@jasim
Created June 3, 2010 06:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jasim/423571 to your computer and use it in GitHub Desktop.
Save jasim/423571 to your computer and use it in GitHub Desktop.
# Main sinatra app
require 'sinatra'
require 'activerecord'
require 'activesupport'
include ActionView::Helpers::DateHelper # add the required helpers here.
require 'controllers.rb'
# controllers.rb
require 'controllers/employee.rb'
require 'controllers/customer.rb'
# controllers/employee.rb
get '/employee' do
#..
end
get '/employee/:id' do
#..
end
get '/employee/:id/edit' do
#..
end
post '/employee/:id' do
#..
end
# controllers/customers.rb
# similar routes here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment