Skip to content

Instantly share code, notes, and snippets.

@beaugaines
Created October 28, 2015 16:29
Show Gist options
  • Save beaugaines/c72e8d8bcfd8b3c450ea to your computer and use it in GitHub Desktop.
Save beaugaines/c72e8d8bcfd8b3c450ea to your computer and use it in GitHub Desktop.
homebrew_domain_modeling
User
has_many :recipes
- email
- name
- location
Recipe
belongs_to :user
has_many :recipe_fermentables
has_many :recipe_equipments
has_many :recipe_additives
has_many :fermentables, through: :recipe_fermentables
has_many :equipments, through: :recipe_equipments
has_many :additives, through: :recipe_additives
- boil_time:decimal{'precision ...'}
- boil_volume:decimal{'precision ...'}
- efficiency:integer
- category:string
- rank:float
- directions:text
RecipeFermentables
belongs_to :recipe
belongs_to :fermentable
Fermentable
belongs_to
name:string
category:string
Additive
- name:string
- category:string
Equipment
- name:string
- category:string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment