forked from agueye/Matlabu-Chifai
/
routes.rb
102 lines (69 loc) · 3.67 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
ActionController::Routing::Routes.draw do |map|
map.flex '/matlabulchifai', :controller => "flex", :action => "index"
map.upload_pic '/uploadPic', :controller => "upload", :action => "index"
map.patient_search '/patients/search.:format', :controller => "patients", :action => "find"
map.allergy_search '/patient_allergies/search.:format', :controller => "patient_allergies", :action => "find"
map.vaccination_search '/patient_vaccinations/search.:format', :controller => "patient_vaccinations", :action => "find"
map.medication_search '/patient_medications/search.:format', :controller => "patient_medications", :action => "find"
map.condtion_search '/patient_visits/search.:format', :controller => "patient_visits", :action => "find"
map.logout '/logout', :controller => "sessions", :action => "destroy"
map.physical '/patients/:patient_id/patient_physicals/:action.:format',
:controller => 'patient_physicals', :action => :action
map.resources :patients do |patients|
patients.resources :patient_alerts
patients.resources :patient_notes
patients.resources :patient_visits
patients.resources :patient_medications
patients.resources :patient_vaccinations
patients.resources :patient_allergies
patients.resources :patient_physicals
end
map.resources :users
map.resource :session
map.resources :patients
map.resources :patient_photos
map.resources :patient_alerts
map.resources :patient_allergies
map.resources :patient_vaccinations
map.resources :patient_medications
map.resources :patient_visits
map.resources :patient_notes
map.resources :visit_types
map.resources :medications
map.resources :conditions
map.resources :vaccinations
map.resources :allergies
map.resources :doctors
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# map.resources :products
# Sample resource route with options:
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
# Sample resource route with sub-resources:
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
# Sample resource route with more complex sub-resources
# map.resources :products do |products|
# products.resources :comments
# products.resources :sales, :collection => { :recent => :get }
# end
# Sample resource route within a namespace:
# map.namespace :admin do |admin|
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
# admin.resources :products
# end
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
#map.root :controller => "patients"
map.root :controller => "flex", :action => "index"
# See how all your routes lay out with "rake routes"
# Install the default routes as the lowest priority.
# Note: These default routes make all actions in every controller accessible via GET requests. You should
# consider removing the them or commenting them out if you're using named routes and resources.
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end