How to extend controllers of a Rails 3 Engine in the main app?


In my Rails 3 app I use an engine having PostsController. I would like to extend it in the main app by adding and altering some methods. I have tried some things which you can see in . There I am facing an exception since PostsController has different superclasses in my engine and main app. Do you know how I can fix it? Is it possible to fix without modifying the engine?