Hi I am having one form there around 30 text field is there.after submitting the form the details should be save in database in capital letter. i tried with CSS text-transform:uppercase; but in frontend it showing capital letter but in database it save in small letter is any one knows please help.. I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER. -- 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 -~----------~----~----~----~------~----~------~--~---
before_save do |record| record.field = record.field.upcase end On 30/07/2008, at 7:02 PM, babu nair wrote:> > Hi > > I am having one form there around 30 text field is there.after > submitting the form the details should be save in database in capital > letter. > i tried with CSS text-transform:uppercase; > but in frontend it showing capital letter but in database it save in > small letter is any one knows please help.. > > I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER. > -- > 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 -~----------~----~----~----~------~----~------~--~---
Also, please only post once. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
babu nair wrote:> i tried with CSS text-transform:uppercase; > but in frontend it showing capital letter but in database it save in > small letter is any one knows please help.. > > I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER.BTW you should not save anything in ALL CAPS. They are tacky, and will make your program look like an obsolete COBOL form-letter experience, courtesy of your friendly neighborhood government bureaucracy. If you actually have a client requesting this incompetent feature, save them from themselves by storing the text the way the user entered it, (and don''t use CSS to transform it, because they won''t see their mistakes). Then display the text using a transformation. If you transform and then save, your program will have bugs when your users enter ligated characters in titlecase, such as an Ae stuck together. -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---