Skip to content

Instantly share code, notes, and snippets.

@alicanerdogan
Created April 15, 2017 14:03
Show Gist options
  • Save alicanerdogan/be282625e799cb2fba8edbcb89950919 to your computer and use it in GitHub Desktop.
Save alicanerdogan/be282625e799cb2fba8edbcb89950919 to your computer and use it in GitHub Desktop.
Phoenix Framework Cheatsheet
# Create a model with following columns
# possible field types: string, integer, references, float, boolean
# to create a belongs to association: ($OWNER)_id:references:$OWNER_PLURAL
mix phoenix.gen.model $MODEL_NAME $PLURAL_MODAL_NAME $FIELD_NAME:FIELD_TYPE
# mix phoenix.gen.model Note notes content:string user_id:references:users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment