Skip to content

Conversation

mclancy96
Copy link

This pull request implements the core functionality for a basic Puppy adoption Rails app. It introduces the Puppy model with the necessary database migration, sets up the PuppiesController with actions to display, create, and show puppies, and provides the corresponding views and routes for user interaction.

Model and Database Setup

  • Added the Puppy model as an ApplicationRecord and created a migration to generate the puppies table with name, breed, and age attributes. [1] [2]

Controller Actions

  • Implemented the index, new, and create actions in PuppiesController, including strong parameter handling for puppy creation.

Routing

  • Defined routes for the homepage, new puppy form, and puppy creation, with the root path set to the puppies index.

Views

  • Built views for:
    • Listing the homepage and linking to the new puppy form (index.html.erb).
    • Displaying the new puppy form using Rails form helpers (new.html.erb).
    • Showing the created puppy's details after submission (create.html.erb).

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.

1 participant