# Getting access to route-generating helpers from a migration

**URL:** <https://www.ruby-forum.com/t/getting-access-to-route-generating-helpers-from-a-migration/142426>\
**Category:** Rails\
**Created:** [July 7, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/getting-access-to-route-generating-helpers-from-a-migration/142426 "2008-07-07T22:27:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 7, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/getting-access-to-route-generating-helpers-from-a-migration/142426/1 "2008-07-07T22:27:54Z")

</div>

Is there any way to get access to a RESTful named route helper from a  
migration.

I’d like to place URLs generated from these routes into a DB table and  
wanted to manage the static data by using a migration. So I’d like to  
be able to get at the URL generated by something like “posts\_url”, for  
example.

Is this doable? Is there some way that I can either include an  
appropriate module in my migration class or directory interrogate the  
Routing class to get this URL?

Thanks,  
Wes
