2 # This file is part of SMR.
4 # SMR is free software: you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or (at your option) any later
9 # SMR is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # SMR. If not, see <http://www.gnu.org/licenses/>.
16 Smr::Application.routes.draw do
18 # See how all your routes lay out with 'rake routes'
20 # See http://guides.rubyonrails.org/routing.html
22 # The priority is based upon order of creation:
23 # first created -> highest priority.
24 root :to => 'asset#index'
28 post "set_session_params" => "application#set_session_params"
31 get 'logout' => 'sessions#destroy', :as => 'logout'
32 get 'login' => 'sessions#new', :as => 'login'
34 resources :password_reset
37 post 'execute_order', to: 'position#execute_order'
38 post 'cancel_order', to: 'position#cancel_order'
39 post 'patch_position', to: 'position#patch'
40 get 'close', to: 'position#close'
42 resources :cashposition
43 get '/cashposition/:id/settle', to: 'cashposition#settle', as: 'settle_cashposition'
45 resources :cashposition
51 get 'download' => 'documents#download'
52 get 'delete_document' => 'documents#delete_document'
54 resources :quoterecords
55 resources :quoterecord_threshold
56 resources :quoterecord_rules
59 get 'blog' => 'blog#index'
61 # ObjectsController shows things while resource routes to the actual models
62 # are used to the CRUDing
63 get 'objects' => 'objects#index'
64 namespace 'objects' do
65 resources :organization, :security, :portfolio, :figurevar, :user
66 post 'patch_portfolio', to: 'portfolio#patch'
69 # DocumentationController shows API docs from doc/
70 get "/doc/:file_or_folder", :controller=>:documentation, :action=>:get_file, :file_or_folder=>/.*/
71 resources :doc, :only=>:get_file