I need to make a query from a Student table. But in the students table it has only one date column(joining_date). I need to get all the students who has joined from beginning of that month to end of that month... I am getting as params @start_date = "2013-09-01"
I tried like the below.. But didn't work.
Student.find(:all, :conditions => ["joining_date=? and joined=?",@start_date.beginning_of_month..@start_date.end_of_month,true])
So is there any way to do this.. Or is it better to query via named_scope.