# Routes.rb structure

**URL:** <https://meta.discourse.org/t/routes-rb-structure/53397>\
**Category:** Development\
**Created:** [Novembre 26, 2016, 1:35 UTC](https://meta.discourse.org/t/routes-rb-structure/53397 "2016-11-26T13:35:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)\
**Post date:** [Novembre 26, 2016, 3:40 UTC](https://meta.discourse.org/t/routes-rb-structure/53397/2 "2016-11-26T15:40:36Z")

</div>

It sounds like you probably don’t want to be using controller actions then. Controllers are typically middlemen between models and views. Hence they’re expecting you to render _something_, whether that’s html, json or just plain headers.

Have you fully read up on [Routes](http://guides.rubyonrails.org/routing.html) and [Controllers](http://guides.rubyonrails.org/action_controller_overview.html)?

Also, is there a particular reason why you’re defining **recom** as a resource and then using a member route? This will attempt to use the **recom** controller and whatever action is after **get** , in this case ‘recom/req’ which I’m not sure is valid but I may be wrong. It be might be trying to default to the **show** action hence your error.

If you just wanted to provide a path just for the **req** action you could just use

`get 'recom/req', to: 'recom#req'`

Anyway, what relevance does this have to Discourse? 🤔

---

_[View the full topic](https://meta.discourse.org/t/routes-rb-structure/53397)._
