How do I write a function:
mymessage("2011-02-27", "Aravind")
that will return
Hello Aravind, you entered the following date: Friday February 27, 2011
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.
Well, Rails works with a model view controller design pattern, so ideally, to do this, you would need to create code in all three components.
For simplicity, i will assume that you want to do this inside a helper, and i will only write the method. First of all, take a look at how you can construct the date :
ROR + Ruby Date in Different Format
Now, your function could be like :