# Problem with controller.controller\_name in production

**URL:** <https://www.ruby-forum.com/t/problem-with-controller-controller-name-in-production/196898>\
**Category:** Rails\
**Created:** [February 21, 2009, 12:54pm UTC](https://www.ruby-forum.com/t/problem-with-controller-controller-name-in-production/196898 "2009-02-21T12:54:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/a698b9/32.png) [@fmh](https://www.ruby-forum.com/u/fmh)\
**Post date:** [February 21, 2009, 12:54pm UTC](https://www.ruby-forum.com/t/problem-with-controller-controller-name-in-production/196898/1 "2009-02-21T12:54:54Z")

</div>

hello,

in production the \<%= controller.controller\_name %\> has no effect in  
view  
I use passenger mod\_rails.

if i restart my apache server , it work but just for 1 or 2 times and  
after stop to work.  
I must each time to restart my apache server.

---

<div class="post-metadata">

**Author:** ![fmh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/a698b9/32.png) [@fmh](https://www.ruby-forum.com/u/fmh)\
**Post date:** [February 21, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/problem-with-controller-controller-name-in-production/196898/2 "2009-02-21T16:03:45Z")

</div>

solution

[http://railsforum.com/viewtopic.php?id=27357](http://railsforum.com/viewtopic.php?id=27357)

just replace controller.controller\_name by params[:controller] for  
action\_name params[:action]
