Looking inside rails code I found text_field use InstanceTag and this
call []before_type_cast and will return my value before turned in ruby
object.
What is the benefit os this behavior?
I can solve my problem forcing value on text_field but I think it is
ugly.
I fix my problem with alias between attribute and
attribute_before_type_cast … I think active record do this because
other kind of columns like decimals or numbers ( i’m not sure ) but
it’s not beautyfull when we need make alias only for make text_field
behave like expected.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.