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

Create Puppy Adoption #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ASPhillips8
Copy link

Created puppy class that is initialized with name, breed, and age. Created a puppy form that has action towards /puppy endpoint. Displayed new puppy through use of erb. Displayed link on homepage that bring to puppy form.
Screenshot 2024-08-08 at 1 53 41 PM
Screenshot 2024-08-08 at 1 53 56 PM
Screenshot 2024-08-08 at 1 54 21 PM

Comment on lines +14 to +17
@breed = params[:breed]
@age = params[:age]
erb :display_puppy

Choose a reason for hiding this comment

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

It would be better to use the Puppy class here.

Copy link
Author

Choose a reason for hiding this comment

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

so like erb :puppy

or were you referring to
@puppy.age = params[:puppy][:age]

Choose a reason for hiding this comment

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

More like

@puppy = Puppy.new(params[:name], params[:breed], params[:age])

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