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
+18
View File
@@ -0,0 +1,18 @@
class SectionArea
include SimplyStored::Couch
include ActiveModel::SerializerSupport
property :title
property :width, type: Float, default: 2
property :height, type: Float, default: 2
property :position_x, type: Float, default: 0
property :position_y, type: Float, default: 0
property :rounded, type: :boolean, default: false
belongs_to :section
belongs_to :supplier
view :by_supplier_id, key: :supplier_id
def self.for_supplier(supplier)
find_all_by_supplier_id(supplier.id)
end
end