-
-
Save leejarvis/88f9c43d6ea9c1fda4e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@date_gt = get_date | |
def get_date | |
if params[:date_gt].present? | |
DateTime.strptime(params[:date_gt], '%m/%d/%Y') | |
else | |
6.months.ago.to_date | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@date_gt = 6.months.ago.to_date | |
if params[:date_gt].present? | |
@date_gt = DateTime.strptime(params[:date_gt], '%m/%d/%Y') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment