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 trialNatansh Pandya
2,810 PointsScope is not giving correct answer?
class Person < ActiveRecord::Base scope :hamptons -> {where("first_name LIKE ?" , "Hampton")} end
1 Answer
Kang-Kyu Lee
52,045 PointsI tried right now, and the answer was
scope :hamptons, -> { where(first_name: "Hampton") }
as shown in the beginning of Finding Control. I guess this is what the question wanted. I don't get why your answer couldn't pass...
Richard Stringfellow
6,883 PointsRichard Stringfellow
6,883 PointsDid anyone ever get this sorted out? Because I'd like to know the answer, too, and I don't have time to waste trying to figuring out the answer to a question, only to find out that the correct answer is rejected.