Skip to content

Instantly share code, notes, and snippets.

@hakagura
Created January 31, 2012 13:41
Show Gist options
  • Save hakagura/1710546 to your computer and use it in GitHub Desktop.
Save hakagura/1710546 to your computer and use it in GitHub Desktop.
logica:
Um usuario deve deve criar um _project_
Um o _project_ deve ter várias _tasks_
Model:
Project :name :description :status
Task :name :user
User :details device
Lógica:
Project has_many Tasks
Task belongs_to Project
User has_many Projects
User has_many Tasks
rails g model project name:string description:text status:string user:references task:references
rails g model task name:string user:references project:references
User
has_many :tasks
has_many :projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment