# Deprecated rails code?

**URL:** <https://discuss.rubyonrails.org/t/deprecated-rails-code/70102>\
**Category:** rubyonrails-talk\
**Created:** [January 6, 2015, 12:57pm UTC](https://discuss.rubyonrails.org/t/deprecated-rails-code/70102 "2015-01-06T12:57:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [January 6, 2015, 12:57pm UTC](https://discuss.rubyonrails.org/t/deprecated-rails-code/70102/1 "2015-01-06T12:57:32Z")

</div>

Hello,

Is this code deprecated?

map.connect ''., :controller =\> "main", :action =\> "welcome"

I am trying to get it to work in the routes.rb file but I don't have any luck.

Thanks

---

<div class="post-metadata">

**Author:** ![Vivek\_Sampara](https://avatars.discourse-cdn.com/v4/letter/v/9dc877/32.png) [@Vivek\_Sampara](https://discuss.rubyonrails.org/u/Vivek_Sampara)\
**Post date:** [January 6, 2015, 1:06pm UTC](https://discuss.rubyonrails.org/t/deprecated-rails-code/70102/2 "2015-01-06T13:06:37Z")

</div>

HI,

What is the rails version you’re using ?

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [January 6, 2015, 1:11pm UTC](https://discuss.rubyonrails.org/t/deprecated-rails-code/70102/3 "2015-01-06T13:11:00Z")

</div>

Rails 4.2.0.rc3

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [January 6, 2015, 1:36pm UTC](https://discuss.rubyonrails.org/t/deprecated-rails-code/70102/4 "2015-01-06T13:36:10Z")

</div>

Please quote the previous message when replying so that people know what you are talking about.

map.connect is no more, have a look at the rails guide on routing to see how to do it.

> **[Rails Routing from the Outside In — Ruby on Rails Guides](https://guides.rubyonrails.org/routing.html)**
>
> Rails Routing from the Outside InThis guide covers the user-facing features of Rails routing.After reading this guide, you will know: How to interpret the code in config/routes.rb. How to construct your own routes, using either the preferred...

If you are following a tutorial then find a more up to date one. railstutorial.org is good and is free to use online.

Colin
