{"action":"opened","issue":{"url":"https://api.github.com/repos/alexisraca/Icaro/issues/5","labels_url":"https://api.github.com/repos/alexisraca/Icaro/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/alexisraca/Icaro/issues/5/comments","events_url":"https://api.github.com/repos/alexisraca/Icaro/issues/5/events","html_url":"https://github.com/alexisraca/Icaro/issues/5","id":57492425,"number":5,"title":"Variants","user":{"login":"alexisraca","id":1482411,"avatar_url":"https://avatars.githubusercontent.com/u/1482411?v=3","gravatar_id":"","url":"https://api.github.com/users/alexisraca","html_url":"https://github.com/alexisraca","followers_url":"https://api.github.com/users/alexisraca/followers","following_url":"https://api.github.com/users/alexisraca/following{/other_user}","gists_url":"https://api.github.com/users/alexisraca/gists{/gist_id}","starred_url":"https://api.github.com/users/alexisraca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexisraca/subscriptions","organizations_url":"https://api.github.com/users/alexisraca/orgs","repos_url":"https://api.github.com/users/alexisraca/repos","events_url":"https://api.github.com/users/alexisraca/events{/privacy}","received_events_url":"https://api.github.com/users/alexisraca/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-12T17:32:14Z","updated_at":"2015-02-12T17:32:14Z","closed_at":null,"body":"- Genera un nuevo modelo que se llame Variant\r\n  dicho modelo tendra: \r\n    - product_id:integer\r\n    - name:string\r\n    - variant_type:string\r\n    - description:text\r\n    - price:decimal, default: 0.0\r\n\r\n- corres migraciones y agregaras una relacion de un producto - tiene muchos variants:\r\n\r\nhas_many :variants\r\n\r\nhttp://guides.rubyonrails.org/association_basics.html#the-has-many-association\r\n\r\nte dejo eso para que lo cheques, no es mucho pero si es necesario entender el concepto en el que un registro de un producto puede estar enlazado a varios registros de la tabla variants, esto hace que un producto pueda llamar product.variants y regrese un array con los variants de ese mismo\r\n\r\nnota: Un variant es como una variante del producto, como una camisa puede ser de manga corta, manga larga, sin mangas, etc, los variants permiten este tipo de relacion, a diferencia de una poliformica, se hace mas facil tener otra tabla que guarde esto.\r\n"}}