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 trial
Daniel Hunter
7,349 Pointsrspec error
I'm getting the following error:
Failures:
1) Creating todo lists Redirects to the todo list index page on success
Failure/Error: visit "/todo_lists"
SyntaxError:
/home/phillycoder14/Applications/odot/app/models/todo_list.rb:3: syntax error, unexpected tINTEGER, expecting keyword_do or '{' or '('
validates :title, length: { minimum 3 }
^
# ./app/controllers/todo_lists_controller.rb:7:in `index'
# ./spec/features/todo_lists/create_spec.rb:5:in `block (2 levels) in <top (required)>'
Not sure what the error is here.
1 Answer
Geoff Parsons
11,679 PointsLooks like on line 3 of todo_list.rb you have a syntax error. You need a colon in your hash after minimum:
validates :title, length: { minimum: 3 }
Daniel Hunter
7,349 PointsDaniel Hunter
7,349 PointsThanks Geoff, knew it had to be something small.
This one I'm not sure about as well: