# Rails 3 & Scope in routes

**URL:** <https://www.ruby-forum.com/t/rails-3-scope-in-routes/188619>\
**Category:** Rails\
**Created:** [May 14, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/rails-3-scope-in-routes/188619 "2010-05-14T20:53:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marek\_j](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@marek\_j](https://www.ruby-forum.com/u/marek_j)\
**Post date:** [May 14, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/rails-3-scope-in-routes/188619/1 "2010-05-14T20:53:11Z")

</div>

Hi,

I have something like this:

scope :module =\> ‘xxxx’, :constraints =\> { :subdomain =\> ‘xxxx’ } do  
match ‘/’, :to =\> ‘welcome#index’, :as =\> :xxxx\_root  
end

Is there a way to add to scope naming prefix. For example

scope :name =\> ‘name’ do  
match ‘/’, :to =\> ‘welcome#index’, :as =\> :root  
end

would be named name\_root, and I could use rails hepers.

Thanks

Marek
