Date within range + Rails

Here is a basic example to determine whether todays date feature within a particular range.

Creating an instance method inside model, this method will return true or false
def notification_required?
    start_date = 15.days.ago.to_date
    end_date =
And to use this method



Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Find duplicate records in ServiceNow