I have run into this scenario a couple of times and am wondering how
other people get around it. When you create a member route it is
intended to operate on just one of a particular model object. My
problem is that sometimes I want to use a member route on a model
object that may not have been created yet. This throws off the route
generation.
Here is an example:
map.resources :user, :member => { :check_email => :post }
So if I were to create a link with the named route:
user_check_email_path(@user) => /user/1/check_email
But what if the @user is a new object? So I want to perform a member
method on the object before it is created. In that case:
user_check_email_path(@user) => /user//check_email
Shouldn’t Rails generate and recognize the route /user/check_email for
the check_email method against a new unsaved @user object?
Thanks,
Tom
