Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails.application.routes.draw do
- scope ":locale", locale: /ru|ua/ do
- root 'users/landing#index'
- # Catalogs
- get 'catalogs/type-:types_technology/brand-:brand/model-:model' => 'users/catalogs#show'
- get 'catalogs/type-:types_technology' => 'users/catalogs#show'
- get 'catalogs/type-:types_technology/brand-:brand/' => 'users/catalogs#show'
- get 'catalogs/brand-:brand/' => 'users/catalogs#show'
- get 'catalogs' => 'users/catalogs#show'
- # Products
- get 'product/:slug' => 'users/goods#show'
- # Handbooks
- get 'handbooks/type-:types_technology/brand-:brand/model-:model' => 'users/handbooks#index'
- get 'handbooks/type-:types_technology' => 'users/handbooks#index'
- get 'handbooks/type-:types_technology/brand-:brand/' => 'users/handbooks#index'
- get 'handbooks/brand-:brand/' => 'users/handbooks#index'
- get 'handbooks' => 'users/handbooks#index'
- # Articles
- get 'article/:slug' => 'users/articles#show'
- # Schemes
- get 'scheme/:slug' => 'users/schemes#show'
- # News
- get 'news' => 'users/news#index', as: :news_index
- get 'news/:slug' => 'users/news#show', as: :news_show
- # Profile
- get 'profile' => 'users/profile#index'
- get 'profile/edit' => 'users/profile#edit'
- patch 'profile/update' => 'users/profile#update'
- get 'order_history' => 'users/profile#order_history'
- # Cart
- get 'cart' => 'users/cart#index'
- get 'order' => 'users/cart#order'
- post 'order_create' => 'users/cart#order_create'
- # Contact
- get 'contacts' => 'users/pages#contacts'
- # Page
- get 'page/:slug' => 'users/pages#show'
- # Search
- get 'search/:search' => 'users/search#index'
- # Ajax
- get 'ajax_query' => 'users/ajax#ajax_query', :defaults => {:format => 'json'}
- get 'ajax_handbooks' => 'users/ajax#ajax_handbooks', :defaults => {:format => 'json'}
- get 'ajax_search' => 'users/ajax#ajax_search', as: :ajax_search, :defaults => {:format => 'json'}
- # Mail
- get 'back_call' => 'application#back_call'
- get 'one_click' => 'application#one_click'
- get 'question' => 'application#question'
- # LiqPay
- get 'liqpay_request' => 'users/cart#liqpay_request'
- post 'liqpay_payment' => 'users/cart#liqpay_payment', :defaults => {:format => 'json'}
- end
- namespace :users do
- get 'comments/new' => 'comments#new', as: :comments_new
- post 'comments/create' => 'comments#create', as: :comments_create
- end
- namespace :admins do
- root 'dashboard#index'
- # Ajax
- get 'admin_order_sms' => 'application#admin_order_sms'
- # Ajax#Library
- get 'library' => 'ajax#index', :defaults => {:format => 'json'}
- post 'library/create' => 'ajax#create', :defaults => {:format => 'json'}
- get 'library/show' => 'ajax#show', :defaults => {:format => 'json'}
- get 'library/delete' => 'ajax#delete', :defaults => {:format => 'json'}
- get 'photos' => 'photos#index', as: :photos_index
- get 'goods' => 'goods#index', as: :goods_index
- get 'goods/new' => 'goods#new', as: :goods_new
- post 'goods/create' => 'goods#create', as: :goods_create
- get 'goods/:id/edit' => 'goods#edit', as: :goods_edit
- patch 'goods/:id/update' => 'goods#update', as: :goods_update
- delete 'goods/:id/destroy' => 'goods#destroy', as: :goods_destroy
- get 'goods/destroy_multiple' => 'goods#destroy_multiple'
- get 'models' => 'models#index', as: :models_index
- get 'models/new' => 'models#new', as: :models_new
- post 'models/create' => 'models#create', as: :models_create
- get 'models/:id/edit' => 'models#edit', as: :models_edit
- patch 'models/:id/update' => 'models#update', as: :models_update
- delete 'models/:id/destroy' => 'models#destroy', as: :models_destroy
- get 'models/destroy_multiple' => 'models#destroy_multiple'
- get 'brands' => 'brands#index', as: :brands_index
- get 'brands/new' => 'brands#new', as: :brands_new
- post 'brands/create' => 'brands#create', as: :brands_create
- get 'brands/:id/edit' => 'brands#edit', as: :brands_edit
- patch 'brands/:id/update' => 'brands#update', as: :brands_update
- delete 'brands/:id/destroy' => 'brands#destroy', as: :brands_destroy
- get 'brands/destroy_multiple' => 'brands#destroy_multiple'
- get 'types_technologies' => 'types_technologies#index', as: :types_technologies_index
- get 'types_technologies/new' => 'types_technologies#new', as: :types_technologies_new
- post 'types_technologies/create' => 'types_technologies#create', as: :types_technologies_create
- get 'types_technologies/:id/edit' => 'types_technologies#edit', as: :types_technologies_edit
- patch 'types_technologies/:id/update' => 'types_technologies#update', as: :types_technologies_update
- delete 'types_technologies/:id/destroy' => 'types_technologies#destroy', as: :types_technologies_destroy
- get 'types_technologies/destroy_multiple' => 'types_technologies#destroy_multiple'
- get 'types_technology_brands' => 'types_technology_brands#index', as: :types_technology_brands_index
- get 'types_technology_brands/new' => 'types_technology_brands#new', as: :types_technology_brands_new
- post 'types_technology_brands/create' => 'types_technology_brands#create', as: :types_technology_brands_create
- get 'types_technology_brands/:id/edit' => 'types_technology_brands#edit', as: :types_technology_brands_edit
- patch 'types_technology_brands/:id/update' => 'types_technology_brands#update', as: :types_technology_brands_update
- delete 'types_technology_brands/:id/destroy' => 'types_technology_brands#destroy', as: :types_technology_brands_destroy
- get 'types_technology_brands/destroy_multiple' => 'types_technology_brands#destroy_multiple'
- get 'articles' => 'articles#index', as: :articles_index
- get 'articles/new' => 'articles#new', as: :articles_new
- post 'articles/create' => 'articles#create', as: :articles_create
- get 'articles/:id/edit' => 'articles#edit', as: :articles_edit
- patch 'articles/:id/update' => 'articles#update', as: :articles_update
- delete 'articles/:id/destroy' => 'articles#destroy', as: :articles_destroy
- get 'articles/destroy_multiple' => 'articles#destroy_multiple'
- get 'news' => 'news#index', as: :news_index
- get 'news/new' => 'news#new', as: :news_new
- post 'news/create' => 'news#create', as: :news_create
- get 'news/:id/edit' => 'news#edit', as: :news_edit
- patch 'news/:id/update' => 'news#update', as: :news_update
- delete 'news/:id/destroy' => 'news#destroy', as: :news_destroy
- get 'news/destroy_multiple' => 'news#destroy_multiple'
- get 'countries' => 'countries#index', as: :countries_index
- get 'countries/new' => 'countries#new', as: :countries_new
- post 'countries/create' => 'countries#create', as: :countries_create
- get 'countries/:id/edit' => 'countries#edit', as: :countries_edit
- patch 'countries/:id/update' => 'countries#update', as: :countries_update
- delete 'countries/:id/destroy' => 'countries#destroy', as: :countries_destroy
- get 'countries/destroy_multiple' => 'countries#destroy_multiple'
- get 'manufacturers' => 'manufacturers#index', as: :manufacturers_index
- get 'manufacturers/new' => 'manufacturers#new', as: :manufacturers_new
- post 'manufacturers/create' => 'manufacturers#create', as: :manufacturers_create
- get 'manufacturers/:id/edit' => 'manufacturers#edit', as: :manufacturers_edit
- patch 'manufacturers/:id/update' => 'manufacturers#update', as: :manufacturers_update
- delete 'manufacturers/:id/destroy' => 'manufacturers#destroy', as: :manufacturers_destroy
- get 'counmanufacturerstries/destroy_multiple' => 'manufacturers#destroy_multiple'
- get 'schemes' => 'schemes#index', as: :schemes_index
- get 'schemes/new' => 'schemes#new', as: :schemes_new
- post 'schemes/create' => 'schemes#create', as: :schemes_create
- get 'schemes/:id/edit' => 'schemes#edit', as: :schemes_edit
- patch 'schemes/:id/update' => 'schemes#update', as: :schemes_update
- delete 'schemes/:id/destroy' => 'schemes#destroy', as: :schemes_destroy
- get 'schemes/destroy_multiple' => 'schemes#destroy_multiple'
- get 'group_filters' => 'group_filters#index', as: :group_filters_index
- get 'group_filters/new' => 'group_filters#new', as: :group_filters_new
- post 'group_filters/create' => 'group_filters#create', as: :group_filters_create
- get 'group_filters/:id/edit' => 'group_filters#edit', as: :group_filters_edit
- patch 'group_filters/:id/update' => 'group_filters#update', as: :group_filters_update
- delete 'group_filters/:id/destroy' => 'group_filters#destroy', as: :group_filters_destroy
- get 'group_filters/destroy_multiple' => 'group_filters#destroy_multiple'
- get 'characteristic_measures' => 'characteristic_measures#index', as: :characteristic_measures_index
- get 'characteristic_measures/new' => 'characteristic_measures#new', as: :characteristic_measures_new
- post 'characteristic_measures/create' => 'characteristic_measures#create', as: :characteristic_measures_create
- get 'characteristic_measures/:id/edit' => 'characteristic_measures#edit', as: :characteristic_measures_edit
- patch 'characteristic_measures/:id/update' => 'characteristic_measures#update', as: :characteristic_measures_update
- delete 'characteristic_measures/:id/destroy' => 'characteristic_measures#destroy', as: :characteristic_measures_destroy
- get 'characteristic_measures/destroy_multiple' => 'characteristic_measures#destroy_multiple'
- get 'characteristic_titles' => 'characteristic_titles#index', as: :characteristic_titles_index
- get 'characteristic_titles/new' => 'characteristic_titles#new', as: :characteristic_titles_new
- post 'characteristic_titles/create' => 'characteristic_titles#create', as: :characteristic_titles_create
- get 'characteristic_titles/:id/edit' => 'characteristic_titles#edit', as: :characteristic_titles_edit
- patch 'characteristic_titles/:id/update' => 'characteristic_titles#update', as: :characteristic_titles_update
- delete 'characteristic_titles/:id/destroy' => 'characteristic_titles#destroy', as: :characteristic_titles_destroy
- get 'characteristic_titles/destroy_multiple' => 'characteristic_titles#destroy_multiple'
- get 'users' => 'users#index', as: :users_index
- get 'users/:id/show' => 'users#show', as: :users_show
- get 'users/destroy_multiple' => 'users#destroy_multiple'
- get 'valuta' => 'valuta#index', as: :valuta_index
- get 'valuta/new' => 'valuta#new', as: :valuta_new
- post 'valuta/create' => 'valuta#create', as: :valuta_create
- get 'valuta/:id/edit' => 'valuta#edit', as: :valuta_edit
- patch 'valuta/:id/update' => 'valuta#update', as: :valuta_update
- delete 'valuta/:id/destroy' => 'valuta#destroy', as: :valuta_destroy
- get 'valuta/destroy_multiple' => 'valuta#destroy_multiple'
- get 'baners' => 'baners#index', as: :baners_index
- get 'baners/new' => 'baners#new', as: :baners_new
- post 'baners/create' => 'baners#create', as: :baners_create
- get 'baners/:id/edit' => 'baners#edit', as: :baners_edit
- patch 'baners/:id/update' => 'baners#update', as: :baners_update
- delete 'baners/:id/destroy' => 'baners#destroy', as: :baners_destroy
- get 'baners/destroy_multiple' => 'baners#destroy_multiple'
- get 'comments' => 'comments#index', as: :comments_index
- get 'comments/:id/edit' => 'comments#edit', as: :comments_edit
- patch 'comments/:id/update' => 'comments#update', as: :comments_update
- delete 'comments/:id/destroy' => 'comments#destroy', as: :comments_destroy
- get 'comments/destroy_multiple' => 'comments#destroy_multiple'
- get 'pages' => 'pages#index', as: :pages_index
- get 'pages/new' => 'pages#new', as: :pages_new
- post 'pages/create' => 'pages#create', as: :pages_create
- get 'pages/:id/edit' => 'pages#edit', as: :pages_edit
- patch 'pages/:id/update' => 'pages#update', as: :pages_update
- get 'orders' => 'orders#index', as: :orders_index
- get 'orders/:id/edit' => 'orders#edit', as: :orders_edit
- patch 'orders/:id/update' => 'orders#update', as: :orders_update
- delete 'orders/:id/destroy' => 'orders#destroy', as: :orders_destroy
- get 'orders/destroy_multiple' => 'orders#destroy_multiple'
- end
- devise_for :users, skip: [:sessions, :registrations, :passwords]
- as :user do
- get 'sign_in', to: 'users/devise/sessions#new', as: :new_user_session
- post 'sign_in', to: 'users/devise/sessions#create', as: :user_session
- get 'sign_out', to: 'users/devise/sessions#destroy', as: :destroy_user_session
- get 'sign_up', to: 'users/devise/registrations#new', as: :new_user_registrations
- post 'sign_up', to: 'users/devise/registrations#create', as: :user_registrations
- get 'forgot_password', to: 'users/devise/passwords#new'
- post 'forgot_password/create', to: 'users/devise/passwords#create'
- get 'forgot_password/edit', to: 'users/devise/passwords#edit'
- put 'forgot_password/update', to: 'users/devise/passwords#update'
- get 'password' => 'users/devise/registrations#edit'
- patch 'password/update' => 'users/devise/registrations#update'
- end
- devise_for :admins, skip: [:sessions]
- as :admin do
- get 'admins/sign_in', to: 'admins/devise/sessions#new', as: :new_admin_session
- post 'admins/sign_in', to: 'admins/devise/sessions#create', as: :admin_session
- get 'admins/sign_out', to: 'admins/devise/sessions#destroy', as: :destroy_admin_session
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement