Would like to get code to display the project report for a
particular period in ruby on rails.
On Sep 19, 8:04 am, ammu [email protected] wrote:
Would like to get code to display the project report for a
particular period in ruby on rails.
Sure. Why not?
Serious, my tarot deck is in the dishwasher and my I Ching is broken,
so I guess:
Two models, project and reports
project:
has_many :reports
then
@project = Project.find(…id of whatever project you want…)
@reports = @project.reports.find(:conditions => ["created_at <=
‘#{8.weeks.ago.to_s(:db)}’ AND created_at > ‘2008-01-01 00:00:00’])
could be somehow what you’re looking far.
Otherwise tell us how your project looks like and what exactly
you want to do…