# Deploying Controller Actions

**URL:** <https://www.ruby-forum.com/t/deploying-controller-actions/173648>\
**Category:** Rails\
**Created:** [August 12, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/deploying-controller-actions/173648 "2009-08-12T18:15:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [August 12, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/deploying-controller-actions/173648/1 "2009-08-12T18:15:19Z")

</div>

Let’s say that one has a set of controller actions that he plans to  
deploy on a collection of different web sites. For the most part, any  
particular action on any given web site in the collection is the same  
as the corresponding action on any other web site in the collection.  
However, there can be minor customizing tweaks to various actions on a  
site by site basis. So, across web sites, corresponding controller  
actions are similar but not identical.

It would be nice to have the base (common) code for the actions in a  
superclass of the controller. That way the base code could be kept  
pristine and identical across all web sites. The minor customizing  
tweaks could be implemented as overriding code in the controller.  
That makes the tweaks much more prominent. In addition, the big  
advantage is that if the base code is updated and the updates don’t  
affect the tweaks, updates to the base code are simply drop-in  
replacements which don’t require any customization.

The base code could be put in the application controller; but, then it  
would inherit down to all controllers. A separate class for each  
controller inserted between the application controller and the  
particular controller involved is what seems to be needed. My  
question is: Is that the way to do it; or, is there a better way?  
I’m concerned about breaking the class chain setup by Rails. Maybe  
it’s no big deal; but, I’d like to know that for sure.

Thanks for any input.

```
       ... doug
```
