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 trialEdwin Goddard
8,988 PointsCan't pass Using Validations Code Challenge
Where am I going wrong, see attached code.
It looks good to me. I've checked in the video again and on the ruby on rails guide site.
class Contact < ActiveRecord::Base
validates :city, length: {in 2..30}, presence: true
end
1 Answer
Maciej Czuchnowski
36,441 PointsYou forgot one colon in the in
:
validates :city, length: {in: 2..30}, presence: true
Edwin Goddard
8,988 PointsEdwin Goddard
8,988 Pointsthanks Buddy :-) that got it