I am storing time as string in database. But at the view layer I want make sure that format for the time is validate.
Plus , how can add a lookup show am and pm.
At controller merge the 2 view level field into one and store in model.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why don’t you store as
datetimeortimein your database, and usetime_selecthelper method?http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-time_select