Add push buttons and support inactive products
This commit is contained in:
@@ -27,7 +27,7 @@ class DashboardController < ApplicationController
|
||||
if Rails.env.test?
|
||||
@tables = Table.all
|
||||
else
|
||||
@tables = List.active.map(&:table) | Supplier.find_by_name('Mozo').tables.select{|t| t.number.between? 20, 50}.sample(3)
|
||||
@tables = List.active.map(&:table) | Supplier.find_by_name('Mozo').tables.select{|t| t.number.between? 20, 500}.sample(3)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html { render layout: 'phone' }
|
||||
|
||||
@@ -98,7 +98,7 @@ module Suppliers
|
||||
private
|
||||
|
||||
def product_params
|
||||
params.require(:product).permit(:name, :code, :price, :description, :image, :visible, :position, :product_category_id)
|
||||
params.require(:product).permit(:name, :code, :price, :description, :image, :visible, :position, :active, :product_category_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user