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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---