section improvements, area elements mostly

This commit is contained in:
2015-03-03 16:43:57 +01:00
parent 196f998c38
commit c038ca3954
40 changed files with 679 additions and 55 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ class Section
has_many :lists
has_many :orders
has_many :section_elements
has_many :section_areas
attr_protected :supplier_id
@@ -99,7 +100,7 @@ class Section
@for_tables_as_json = h
end
def arrange_tables_in_grid
def arrange_tables_in_grid(tables = self.tables)
w = width
h = height
n = tables.size