I have a credit card number field on a table. For <%= f.text_field :credit_number %>, I want to show it with some format like 'xxxx xxxx xxxx xxxx' instead of 'xxxxxxxxxxxxxxxx'. But I don't want to save the space with the number in the DB.
For now I don't care about inputting but only displaying.
What's the best way to accomplish it?
Thanks.
Sam