Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ComponentsModel #134

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

Josecisneros001
Copy link
Collaborator

What does this PR do?

  • Implementation of Component and ComponentCategory Models.
  • Creates db tables with migration.
  • Spec implementation for both models.

Related issues

#119

Merge Checklist:

  • The branch is up-to-date (i.e. rebased) with the base branch
  • No code style issues

Copy link
Owner

@gallosanchez23 gallosanchez23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Josecisneros001 es posible que un componente tenga varias categorías? en todo caso tendríamos que modificar el código para que fuera una relación de muchos a muchos, ya que actualmente es de uno a muchos.

:img_path,
presence: true

belongs_to :component_category
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Josecisneros001 esto se vuelve muy repetitivo ya que quedaría algo como component.component_category. Porfa hay que agregar un alias a esta association, igual podría ser solo category. Finalmente el otro modelo de Category hace referencia a las competencias.

spec/factories/components.rb Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants