I am trying to do validation in an ActiveRecord object.
I have a field called replay_limit. Here is what happens when the web
fills in invalid data into replay_limit (which is declared as an
integer in Mysql):
I do puts in the validate routine to show its class and value. Note
that it is a Fixnum,
and it has a value of 6. Yet, the to_yaml shows what the user really
which I would like to access in the validate routine, and return an
How can things get in this situation? How can I get at the real
"string" value of
what the user entered?
self.replay_limit.class = Fixnum
self.replay_limit = 6
--- &id001 !ruby/object:Service
Also, why isn't there quotes around the 6# that to_yaml outputs?