Hi,
I have a drop down select see below which populates from the below,
select(:record, :visually_similar_to, Sample.find(:all).collect {|p|
p.sample_ref, p.id ] })
sample_ref is varchar field so the values that populate the drop down
are below and they include the leading zeros
0003
0004
0005
etc…
When i save this record the field is called visually_similar_to this
removes the leading zeros and leaves it with just the 3 or 4 etc
Why is it removing the leading zeros if its saving to a string field,
how can i stop this. I dont always know how many characters will be in
the field so i couldnt just count the number of characters and then add
the missing zero’s, this shouldnt be neccessary anyway because its a
string field?
Can anyone help?
JB