Refactor for authorization sanity

This commit is contained in:
2015-02-19 16:29:17 +01:00
parent a1474e934a
commit 5b3c1a9007
22 changed files with 190 additions and 80 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class DashboardController < ApplicationController
if Rails.env.test?
@tables = Table.all
else
@tables = (current_supplier || Supplier.first).tables.sample(5) | List.active.map(&:table) | Supplier.find_by_email('supplier2@mozo.bar').tables.sample(3)
@tables = (Supplier.last || Supplier.first).tables.sample(5) | List.active.map(&:table) | Supplier.find_by_email('supplier2@mozo.bar').tables.sample(3)
end
respond_to do |format|
format.html { render layout: 'phone' }