New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 6 on Test sort products #37
Comments
The seconds line is a mistakes and does nothing (corrected on aa1d846) About the test who fail are you sure that you have implementing |
Ok mistake resolved 😆 scope :recent, lambda {
order(:updated_at)
} About test this fails in expected order, the error that returns the test command is:
Thinking a bit, the default order is :asc so the result of :recent scope is [:one, :two, :another_tv] if we don't touch any, but when we touch :two this comes to final so the result will doing [:one, :another_tv, :two]. But in book expected is:
I'm right or maybe I losing something? |
I implemented the test code and code on model but test fails becuase doesn't return products in expected order, also anyone can explain me what does those two last lines? I understand that the first line updates the datetime on "updated_at" atrribute, but second line, what does?
The text was updated successfully, but these errors were encountered: