learn-co-curriculum / sinatra-fwitter-group-project

Other
2 stars 318 forks source link

application_controller_spec.rb: 153 (no #slug) #7

Closed onyoo closed 8 years ago

onyoo commented 8 years ago

There seems to be no #slug defined for an instance of User. I replaced line 153, from:

get "/users/#{user.slug}"

to:

get "/users/#{user.username}"

It seems to be working well. It might break if the username is not a slug already, but we could have that be a requirement on sign-up.

victhevenot commented 8 years ago

hey @onyoo - there are model tests that have you create a slug method in your User class. The tests in the application_controller_spec won't work until you pass the tests in spec/models/user_spec.rb.