# How to override generated named route helpers?

**URL:** <https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994>\
**Category:** Rails\
**Created:** [May 21, 2010, 3:35pm UTC](https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994 "2010-05-21T15:35:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [May 21, 2010, 3:35pm UTC](https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994/1 "2010-05-21T15:35:12Z")

</div>

Hey,

where exactly are these methods defined? I’d like to use alias\_method  
to set some parameters before calling the original methods.

Cheers,  
Szymon

---

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [May 21, 2010, 11:06pm UTC](https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994/2 "2010-05-21T23:06:26Z")

</div>

Szymon N. wrote:

> Hey,
> 
> where exactly are these methods defined? I’d like to use alias\_method  
> to set some parameters before calling the original methods.

They’re defined by the map.resources calls in routes.rb. You could  
probably alias them anytime after that file is executed…but why? You  
can set parameters when you define them.

What are you trying to accomplish?

> Cheers,  
> Szymon

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
