Matt

Joined

570 Experience
5 Lessons Completed
0 Questions Solved

Activity

Posted in Active Query: object date within the next 30 days.

So handy!

Thank you for the pro-tip. That will be really nice to implement for my next widget.

Posted in Active Query: object date within the next 30 days.

Wow, thank you so much Chris!! That worked. :)

That's the first time I've used a scope and it seems so magical now! I need to go read up on using them more.

Posted in Active Query: object date within the next 30 days.

Hi there,

I'm fairly new to programming and rails. I was wondering if someone could help point me in the right direction here.

I've created a new date field in Active Record and I'm trying to iterate through my objects that are coming up within the next 30 days. Would something like this be appropriate, or how should I go about doing this?

@nodes.where('cutdate', 30.days.from_now)