Adding the routes, controller, new action and some tests

This commit is contained in:
Will Marshall
2014-02-07 13:53:36 +11:00
parent 1ca9a86042
commit 26e4adf7a6
2 changed files with 6 additions and 2 deletions

View File

@@ -34,7 +34,6 @@ class ShopController < BaseController
private
def set_distributor
unless @distributor = current_distributor
redirect_to root_path
end

View File

@@ -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