stability upgrade
This commit is contained in:
+1
-1
@@ -248,7 +248,7 @@ class List
|
|||||||
end
|
end
|
||||||
|
|
||||||
def table_number
|
def table_number
|
||||||
@table_number ||= table.number
|
@table_number ||= table.try(:number).to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def active?
|
def active?
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ class Order
|
|||||||
end
|
end
|
||||||
|
|
||||||
def table_number
|
def table_number
|
||||||
list.table.number
|
list.table_number
|
||||||
end
|
end
|
||||||
alias table_nr table_number
|
alias table_nr table_number
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Supplier
|
|||||||
has_many :tables, dependent: :destroy
|
has_many :tables, dependent: :destroy
|
||||||
has_many :lists, dependent: :destroy
|
has_many :lists, dependent: :destroy
|
||||||
#has_many :lists, through: :tables
|
#has_many :lists, through: :tables
|
||||||
has_many :orders
|
has_many :orders, dependent: :destroy
|
||||||
has_many :sections, dependent: :destroy
|
has_many :sections, dependent: :destroy
|
||||||
|
|
||||||
after_create :add_section_on_create
|
after_create :add_section_on_create
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ form#select-date-form action='' method="get"
|
|||||||
td=show_boolean list.needs_help
|
td=show_boolean list.needs_help
|
||||||
td=show_boolean list.needs_payment
|
td=show_boolean list.needs_payment
|
||||||
td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
|
td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
|
||||||
td= link_to_if list.table.present?, list.table.try(:number), [:suppliers, list.table]
|
td= link_to_if list.table.present?, list.table_number, [:suppliers, list.table]
|
||||||
td.currency= list.price.present? ? currency(list.price) : '...'
|
td.currency= list.price.present? ? currency(list.price) : '...'
|
||||||
td.timestamp data-time=list.created_at.utc.iso8601
|
td.timestamp data-time=list.created_at.utc.iso8601
|
||||||
td.actions
|
td.actions
|
||||||
|
|||||||
Reference in New Issue
Block a user