Posts [ 4 ]

Topic: Date Comparison

HiI'm an absolute beginner to ruby and rails. I'm trying to develop a financial application. I'm done with scaffolding and most of the changes i wanted to make in the scaffolded code. there's one thing though, that i havent been able to implement. I have a model Transaction for transactions that are made. It has a date field, for the date on which the transaction was made. I want the user to be able to select a date and then be able to see all the transactions made after that date. I've tried a few things but nothing seems to work. Its a big step, learning a new language and a framework at the same time, while you're developing an application which you actually need to deploy. The reason I shifted to RoR was because I didn't have a lot of time. I made considerable progress in very less time but now i'm absolutely stuck.thanksNavjot Kukreja

Re: Date Comparison

Date field is stored as type date. Getting the date i want to compare with to the controller is the problem i'm facing. please tell me how do i make the view AND controller for this. with stress on how to get the desired date value to compare with to the controller.thank you