Re: True expression still evaluates false

Chris [email protected] wrote:

    templates.push star

is in my model code. What’s going on here?
If one is a string, and the other is an integer, that will evaluate to
false;

irb(main):001:0> a = “1”
=> “1”
irb(main):002:0> b = 1
=> 1
irb(main):003:0> a == b
=> false
irb(main):004:0> a.to_i == b.to_i
=> true

Cheers,
Tyler