Skip to content

Instantly share code, notes, and snippets.

@caffo
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caffo/e07e6c152f06ede2a7ca to your computer and use it in GitHub Desktop.
Save caffo/e07e6c152f06ede2a7ca to your computer and use it in GitHub Desktop.
Products

Product

  • belongs_to category (req)
  • has_many variations
  • name (req)

Screens

New product

  • Product name (textfield)
  • Category (select)

Listing

  • Name
  • Category
  • Edit (button)
  • Delete (button)
  • Variations (button)

Category

  • has_many options
  • has_many products

Variation

  • belongs_to product
  • belongs_to category thru product
  • has_many options thru category.metadatum
  • quantity (int)
  • price (money or decimal)
  • image (file)

Screens

New Variation

  • one select for each metadatum (required fields)
  • quantity (text)
  • price (text)
  • image (upload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment