Rails easy shop

Posted by ciss on Stack Overflow See other posts from Stack Overflow or by ciss
Published on 2010-05-20T10:03:49Z Indexed on 2010/05/20 10:10 UTC
Read the original article Hit count: 173

I have some question about data organization in my shop.

So, after easy mind hacking i decide to create three models: Item, Property and PropertyType

Item: id,property_id

Property: id, data, property_type_id 
#(data, serialized object with something like what: {:color => "red", :price => 1000}

PropertyType: id, data 
#(data, also serialized object with {:color => :string, :price => :fixnum})

So, does this good or bad idea?

I predict what I can find some problems with validations.

But I really need some fields created by user via admin-panel (now I'm talking about Item Properties, which can be changed in any time)

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about serialization