Make a permanent_gallery_url helper. When you start using slugs, you'll be glad you did this. See permanent_blog_post_url.