Dynamic routing to a controller's action. If you have a rails form which has multiple submit buttons such as Publish
and Unpublish
, you can easily route those to corresponding actions within the controller with this clever hack.
Recent articles
- Ruby's clamp method reduces conditionals - 24th February 2025
- Regex within string square brackets - 24th February 2025
- Elegant solution to versioning an API - 24th February 2025