a better way to check changes of url

Sorry...I just modify it according to your comment.
Thanks!

One more comment; I don't think :on=>:update will ever be called unless the card is "real".  Otherwise you're creating, not updating, right?