# How to get routing variables in model

**URL:** <https://www.ruby-forum.com/t/how-to-get-routing-variables-in-model/134827>\
**Category:** Rails\
**Created:** [April 15, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/how-to-get-routing-variables-in-model/134827 "2008-04-15T13:56:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [April 15, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/how-to-get-routing-variables-in-model/134827/1 "2008-04-15T13:56:21Z")

</div>

Hi folks,

In routes.rb I specified some routing urls, like below,

map.login ‘/login’, :controller =\> ‘account’, :action =\> ‘new’

Here I want to use this login\_path in my any one of model, Is it  
possible,

Whether I have to create one separate model and inherit this routing  
module to it, or else can we directly call this routing variables in my  
model

Regards,  
T.Veeraa.
