mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Adding the routes, controller, new action and some tests
This commit is contained in:
@@ -34,7 +34,6 @@ class ShopController < BaseController
|
||||
private
|
||||
|
||||
def set_distributor
|
||||
|
||||
unless @distributor = current_distributor
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
Openfoodnetwork::Application.routes.draw do
|
||||
root :to => 'home#temp_landing_page'
|
||||
|
||||
|
||||
resource :shop, controller: :shop do
|
||||
get :products
|
||||
post :order_cycle
|
||||
get :order_cycle
|
||||
end
|
||||
|
||||
namespace :shop do
|
||||
resource :checkout, controller: :checkout do
|
||||
get :new
|
||||
end
|
||||
end
|
||||
|
||||
resources :enterprises do
|
||||
collection do
|
||||
get :suppliers
|
||||
|
||||
Reference in New Issue
Block a user