When redirect_to takes a Model, it filters through a few methods to get the path calling the polymorphic_url method. The API for this method [1] actually has a lot of details, copied from the comments here: