2016-01-12 18:43:00 -06:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
|
2016-10-14 12:19:00 -05:00
|
|
|
resources :notes
|
2016-01-18 19:41:26 -06:00
|
|
|
resources :recipes do
|
2018-04-01 21:43:23 -05:00
|
|
|
collection do
|
|
|
|
post :preview_steps
|
|
|
|
end
|
2016-08-15 17:43:02 -05:00
|
|
|
resources :logs, only: [:new, :create]
|
2016-01-18 19:41:26 -06:00
|
|
|
end
|
2016-01-14 18:56:45 -06:00
|
|
|
|
2016-07-06 21:00:35 -05:00
|
|
|
resources :logs, except: [:new, :create]
|
|
|
|
|
2018-04-02 00:10:06 -05:00
|
|
|
resources :ingredients, except: [] do
|
2016-01-14 15:22:15 -06:00
|
|
|
collection do
|
2016-01-28 14:19:51 -06:00
|
|
|
get :usda_food_search
|
|
|
|
|
2016-01-14 15:22:15 -06:00
|
|
|
constraints format: 'json' do
|
|
|
|
get :search
|
|
|
|
get :prefetch
|
2016-01-18 12:58:54 -06:00
|
|
|
get :convert
|
2016-01-14 15:22:15 -06:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2016-01-12 18:43:00 -06:00
|
|
|
|
2016-01-29 18:45:20 -06:00
|
|
|
match '/ingredients(/:id)/select_ndbn' => 'ingredients#select_ndbn', via: [:post, :patch, :put]
|
|
|
|
|
2016-10-20 15:48:33 -05:00
|
|
|
resources :tags, only: [:index] do
|
|
|
|
collection do
|
|
|
|
constraints format: 'json' do
|
|
|
|
get :search
|
|
|
|
get :prefetch
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-19 16:50:39 -06:00
|
|
|
resource :user, only: [:new, :create, :edit, :update]
|
|
|
|
|
|
|
|
get '/login' => 'users#login', as: :login
|
|
|
|
post '/login' => 'users#verify_login'
|
|
|
|
get '/logout' => 'users#logout', as: :logout
|
2018-03-30 17:08:09 -05:00
|
|
|
get '/user' => 'users#show', as: :show
|
2016-01-19 16:50:39 -06:00
|
|
|
|
2016-01-30 21:20:15 -06:00
|
|
|
get '/about' => 'home#about', as: :about
|
|
|
|
|
2016-01-31 00:00:32 -06:00
|
|
|
scope '/calculator', controller: :calculator, as: :calculator do
|
|
|
|
get '/' => :index
|
|
|
|
get '/calculate' => :calculate
|
2016-03-03 13:12:42 -06:00
|
|
|
get '/ingredient_search' => :ingredient_search
|
|
|
|
end
|
|
|
|
|
|
|
|
namespace 'admin' do
|
|
|
|
resources :users, except: [:new, :create]
|
2016-01-31 00:00:32 -06:00
|
|
|
end
|
|
|
|
|
2018-04-17 18:38:48 -05:00
|
|
|
get 'sw.js' => 'home#sw'
|
2018-03-29 01:57:00 -05:00
|
|
|
root 'home#index'
|
2016-01-12 18:43:00 -06:00
|
|
|
|
|
|
|
|
|
|
|
end
|