Shopify/batman — Issue #341: ID parameters aren't cast to Integer types
Author: jmacdonald
Created: 2012-02-24 15:23:01+00:00
State: open

When using resource routing, ID-type parameters aren't cast to integers, they're left as strings. This is fine if you're using the ID on a class' `find` method, which does this casting automatically, but sometimes you're establishing a relationship between two objects by setting one object's foreign key. In these cases, this value needs to be manually cast to an integer. This should be taken care of automatically, especially in situations where the parameter's datatype is unambiguous.

I'm opening this up for discussion, because theoretically, an ID value could be alphanumeric.