Skip to content

Create Vendor_sweets #4

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

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

Conversation

Lsimmons98
Copy link

Create vendor_sweets and require comments.

Comment on lines +1 to +8
class VendorSweet < ApplicationRecord
belongs_to :vendor
belongs_to :sweet

validates :vendor_id, :sweet_id, :comment, presence: true


end
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class VendorSweet < ApplicationRecord
belongs_to :vendor
belongs_to :sweet
validates :vendor_id, :sweet_id, :comment, presence: true
end
class VendorSweet < ApplicationRecord
belongs_to :vendor
belongs_to :sweet
validates :vendor_id, :sweet_id, :comment, presence: true
end

Comment on lines +8 to +12
</ul>



<%= form_for @vendor_sweet do |f|%>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
</ul>
<%= form_for @vendor_sweet do |f|%>
</ul>
<%= form_for @vendor_sweet do |f|%>

Comment on lines +4 to +7
resources :vendor_sweets


resources :vendors do
Copy link
Contributor

@stephenmckeon stephenmckeon Aug 22, 2024

Choose a reason for hiding this comment

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

Only define routes that you are using.

Suggested change
resources :vendor_sweets
resources :vendors do
resources :vendor_sweets
resources :vendors do

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