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

Task given validation, association and code of pundit policy #10

Merged
merged 2 commits into from
Apr 13, 2021

Conversation

Anishluke92
Copy link
Owner

No description provided.

@@ -1,2 +1,3 @@
class Project < ApplicationRecord
has_many :tasks, dependent: :destroy
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is indented too much. The standard we use for indentation is 2 spaces.

@@ -1,3 +1,4 @@
class Task < ApplicationRecord
belongs_to :project
validates :name, presence: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can validate project_id also

Copy link
Collaborator

@dqnamo dqnamo left a comment

Choose a reason for hiding this comment

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

changes.

@dqnamo dqnamo merged commit f6b5718 into main Apr 13, 2021
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