# Method url

**URL:** <https://www.ruby-forum.com/t/method-url/197133>\
**Category:** Ruby\
**Created:** [April 30, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/method-url/197133 "2010-04-30T18:55:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kevid](https://www.ruby-forum.com/u/kevid)\
**Post date:** [April 30, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/method-url/197133/1 "2010-04-30T18:55:45Z")

</div>

Hi all,

Does anyone knows how to access a method’s url within the method

for instance;

## def index

–  
– #some code that will append a parameter to the url that will call  
the show method.  
show  
end

def show  
url = (show method’s url with the appended parameter )  
puts url # =\> [http://localhost:8080/app/Input/show?cv=xxxxxxxxxx](http://localhost:8080/app/Input/show?cv=xxxxxxxxxx)  
end

The idea is to be able to access the appended parameter within the  
show method.

…will appreciate any idea.

---

<div class="post-metadata">

**Author:** ![kevid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kevid](https://www.ruby-forum.com/u/kevid)\
**Post date:** [April 30, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/method-url/197133/2 "2010-04-30T19:51:22Z")

</div>

On Fri, Apr 30, 2010 at 18:55, kevid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the show method.
> 
> …will appreciate any idea.

Please do not cross-post.
