-
Notifications
You must be signed in to change notification settings - Fork 172
CRUD for Questionnaire #246
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
base: main
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
efg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| @@ -0,0 +1,7 @@ | |||
| class QuestionTypesController < ApplicationController | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ItemTypesController
app/models/question_type.rb
Outdated
| @@ -0,0 +1,7 @@ | |||
| class QuestionType < ApplicationRecord | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ItemType
app/models/question_type.rb
Outdated
| validates :name, presence: true, uniqueness: true | ||
|
|
||
| # Associations (if any later) | ||
| # has_many :questionnaires, foreign_key: :questionnaire_type, primary_key: :name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has_many: consider replacing by belongs_to:
| end | ||
|
|
||
| # Check_for_question_associations checks if questionnaire has associated questions or not | ||
| # Check_for_question_associations checks if questionnaire has associated items or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_for_item_associations
No description provided.