Weird behaviour of sum in ruby on rails console?

This depends on the fact that in Ruby white spaces can be significant. You see different results because Ruby interprets your example in different ways. So.

This depends on the fact that in Ruby white spaces can be significant. You see different results because Ruby interprets your example in different ways. So The first: "ayay".

Length + 1 is like "ayay".length. +(1) And the second: "ayay". Length +1 is like "ayay".

Length(+1) In this way you can see why Ruby gives an error in the second case. Regarding the count problem: Ruby interprets the code as: User. Count(+1) And, as you can see from the generated SQL, there is a difference because +1 is considered the column_name parameter.

Parentheses often can save you :) – Bohdan Nov 29 at 15:11 Yep. Absolutely true ;) – lucapette Nov 29 at 15:18 Thank you for the response, just what I thought. Nonetheless, seems a strange behaviour... – fuzzyalej Nov 29 at 15:22.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions