Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRoxana Guinea
5,675 PointsGenerate a migration to add an attribute to the Pet model. On the command line, specify an attribute name of breed, with
I'm having trouble with Task 1 of Updating the Model part of the Ruby on Rails 5 Basics course: Question: Generate a migration to add an attribute to the Pet model. On the command line, specify an attribute name of breed, with a type of string. Since we're just adding one column, don't forget to name the migration in the format Add[ColumnName]To[ModelName (plural)]. My answer below renders a bummerβ¦
bin/rails generate migration AddBreedToPets breed: string
2 Answers
Abdullah Hashim
4,546 PointsYou've got a space between breed: and string that shouldn't be there.
Adriana Cabrera
14,618 Pointsbin/rails generate migration AddBreedToPets breed:string