continuing the refactor of the admin section
This commit is contained in:
@@ -2,5 +2,9 @@ module Admin
|
||||
class ApplicationController < ::ApplicationController
|
||||
before_filter :authenticate_administrator!
|
||||
layout 'administrator'
|
||||
private
|
||||
def set_locale
|
||||
I18n.locale = :en
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,6 +44,7 @@ module Admin
|
||||
# POST /lists.json
|
||||
def create
|
||||
@list = List.new(params[:list])
|
||||
@list.supplier_id = params[:list][:supplier_id]
|
||||
|
||||
respond_to do |format|
|
||||
if @list.save
|
||||
|
||||
@@ -44,6 +44,7 @@ module Admin
|
||||
# POST /product_categories.json
|
||||
def create
|
||||
@product_category = ProductCategory.new(params[:product_category])
|
||||
@product_category.supplier_id = params[:product_category][:supplier_id]
|
||||
|
||||
respond_to do |format|
|
||||
if @product_category.save
|
||||
|
||||
@@ -44,6 +44,7 @@ module Admin
|
||||
# POST /products.json
|
||||
def create
|
||||
@product = Product.new(params[:product])
|
||||
@product.supplier_id = params[:product][:supplier_id]
|
||||
|
||||
respond_to do |format|
|
||||
if @product.save
|
||||
|
||||
@@ -44,6 +44,7 @@ module Admin
|
||||
# POST /sections.json
|
||||
def create
|
||||
@section = Section.new(params[:section])
|
||||
@section.supplier_id = params[:section][:supplier_id]
|
||||
|
||||
respond_to do |format|
|
||||
if @section.save
|
||||
|
||||
@@ -44,6 +44,7 @@ module Admin
|
||||
# POST /tables.json
|
||||
def create
|
||||
@table = Table.new(params[:table])
|
||||
@table.supplier_id = params[:table][:supplier_id]
|
||||
|
||||
respond_to do |format|
|
||||
if @table.save
|
||||
|
||||
Reference in New Issue
Block a user