I have a controller with multiple actions that take :year and :month as attributes from the URL. I have made a private method check_date to check the date is valid and check
You can throw in
return false
wherever you want the code execution in your action to stop