change styling towards design rj

This commit is contained in:
2012-09-02 12:23:08 +02:00
parent 6ad542b65c
commit 50434c28cf
23 changed files with 3087 additions and 25 deletions
+8
View File
@@ -14,6 +14,14 @@ class Section
validates :supplier_id, presence: true
# Probably faster to directly retreive the document and return nil
# if the supplier does not match
def self.find_by_supplier_and_id(supplier, id)
section = find(id)
return nil unless section.supplier_id == supplier.id
section
end
def width
self.path.last.try(:first).to_f - self.path.first.try(:first).to_f
end