Ordering refactored: Made everything RESTful.
This commit is contained in:
parent
45e0048490
commit
eb4705857b
19 changed files with 340 additions and 222 deletions
|
|
@ -2,8 +2,8 @@
|
|||
# TODO: When to use class or module. It seems this could also be a Foodsoft-class?
|
||||
module Foodsoft
|
||||
mattr_accessor :env, :config, :database
|
||||
CONFIGS = YAML.load(File.read(RAILS_ROOT + "/config/app_config.yml"))
|
||||
DATABASES = YAML.load(File.read(RAILS_ROOT + "/config/database.yml"))
|
||||
CONFIGS = YAML.load(File.read(File.join(Rails.root, "/config/app_config.yml")))
|
||||
DATABASES = YAML.load(File.read(File.join(Rails.root, "/config/database.yml")))
|
||||
|
||||
class << self
|
||||
def env=(env)
|
||||
|
|
@ -15,7 +15,7 @@ module Foodsoft
|
|||
end
|
||||
end
|
||||
# Initial load the default config and database from rails environment
|
||||
Foodsoft.env = RAILS_ENV
|
||||
Foodsoft.env = Rails.env
|
||||
|
||||
# Set action mailer default host for url generating
|
||||
url_options = {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
match '/ordering/myOrders' => 'ordering#myOrders', :as => 'my_orders'
|
||||
resources :group_orders, :controller => 'ordering', :path => 'ordering' do
|
||||
get :archive, :on => :collection
|
||||
end
|
||||
match '/ordering' => 'ordering#index', :as => 'ordering'
|
||||
|
||||
############ Foodcoop orga
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue