Renaming ShopController to Shop::ShopController

This commit is contained in:
Will Marshall
2014-02-07 16:52:18 +11:00
parent 7af1d72ef9
commit b11533a629
14 changed files with 13 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
class ShopController < BaseController
class Shop::ShopController < BaseController
layout "darkswarm"
before_filter :set_distributor
@@ -22,12 +22,12 @@ class ShopController < BaseController
if request.post?
if oc = OrderCycle.with_distributor(@distributor).active.find_by_id(params[:order_cycle_id])
current_order(true).set_order_cycle! oc
render partial: "shop/order_cycle"
render partial: "shop/shop/order_cycle"
else
render status: 404, json: ""
end
else
render partial: "shop/order_cycle"
render partial: "shop/shop/order_cycle"
end
end

View File

@@ -1,7 +1,7 @@
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
:javascript
angular.module('Shop').value('orderCycleData', #{render "shop/order_cycle"})
angular.module('Shop').value('orderCycleData', #{render "shop/shop/order_cycle"})
- if @order_cycles.empty?
@@ -10,8 +10,8 @@
Please contact your hub directly to see if they accept late orders,
or wait until the next cycle opens.
= render partial: "shop/next_order_cycle"
= render partial: "shop/last_order_cycle"
= render partial: "shop/shop/next_order_cycle"
= render partial: "shop/shop/last_order_cycle"
- else
%form.custom

View File

@@ -50,5 +50,5 @@
%tr.product-description
%td{colspan: 2}{{ product.notes | truncate:80 }}
%tr{"ng-repeat" => "variant in product.variants", "ng-show" => "product.show_variants"}
= render partial: "shop/variant"
= render partial: "shop/shop/variant"
%input.button.right{type: :submit, value: "Check Out"}

View File

@@ -9,7 +9,7 @@
%small
%a{href: "/"} Change location
= render partial: "shop/order_cycles"
= render partial: "shop/shop/order_cycles"
-#%description
@@ -44,9 +44,9 @@
%p Contact
%products.row
= render partial: "shop/products"
= render partial: "shop/shop/products"
#footer
%section.row
= render partial: "shop/contact_us"
= render partial: "shop/about_us"
= render partial: "shop/shop/contact_us"
= render partial: "shop/shop/about_us"
= render partial: "shared/copyright"

View File

@@ -1,7 +1,7 @@
Openfoodnetwork::Application.routes.draw do
root :to => 'home#temp_landing_page'
resource :shop, controller: :shop do
resource :shop, controller: "shop/shop" do
get :products
post :order_cycle
get :order_cycle

View File

@@ -1,6 +1,6 @@
require 'spec_helper'
describe ShopController do
describe Shop::ShopController do
let(:d) { create(:distributor_enterprise) }
it "redirects to the home page if no distributor is selected" do