# Plugin Controller Method never called

**URL:** <https://meta.discourse.org/t/plugin-controller-method-never-called/42815>\
**Category:** Development\
**Created:** [April 19, 2016, 11:14am UTC](https://meta.discourse.org/t/plugin-controller-method-never-called/42815 "2016-04-19T11:14:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![EndruK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/endruk/32/50211_2.png) [@EndruK](https://meta.discourse.org/u/EndruK)\
**Post date:** [April 19, 2016, 11:14am UTC](https://meta.discourse.org/t/plugin-controller-method-never-called/42815/1 "2016-04-19T11:14:52Z")

</div>

I there,  
I want to create a plugin with new routes and an own server-controller.  
My problem is that discourse knows that there is the controller and expects the method for the route.  
But the code in my controller method is never called. ☹

plugin:

```plaintext
Disraptor::Engine.routes.draw do
  root to: "disraptor#show"
  get /testroute => "disraptor#show"
end

Discourse::Application.routes.prepend do
  mount Disraptor::Engine, at: "/"
end

```

Controller:

```plaintext
class Disraptor::DisraptorController < ApplicationController
  def show
    #never gets called :(
    Rails.logger.info "test"
  end
end

```

I don’t know whats the problem here, I just want to mount my plugin Engine at the root route and add an additional route and do some stuff on the server.

This guy has the same problem that his controller method never gets called:  
[https://meta.discourse.org/t/help-wanted-on-plugin-controller/40258](https://meta.discourse.org/t/help-wanted-on-plugin-controller/40258)

---

_[View the full topic](https://meta.discourse.org/t/plugin-controller-method-never-called/42815)._
