Displaying 1 result from an estimated 1 matches for "find_by_month_and_year".
2006 Oct 24
1
Code blocks syntax as method arguments
How do I format this so that it does what I want it to,
Day.find_by_month_and_year(
[Date::today.month + 1 if !Date::today.month == 12 else 1 end],
[Date::today.year if !Date::today.month == 12 else Date::today.year +
1 end]
)
?
WHICH IS
to pass Day.find_by_month_and_year Date:today.month +1 if the month is
not december otherwise pass, 1, and to pass as the second argum...