My questions refers to the following development stack:
- Rails 3.2.1
- Draper 0.14
- Ancestry 1.2.5
What I want to do is, deliver the navigation to my layout. So I've defined a before filter in my ApplicationController.
class ApplicationController < ActionController::Base
[..]
before_filter :current_navigation
[..]
def current_navigation
@n = PublicationDecorator.find(1)
end
end
As you see in the code listing above, I'm using the draper. My PublicationDecorator isn't available in the ApplicationController. So how do I get all my Publications decorated?
uninitialized constant ApplicationController::PublicationDecorator
I'm using the ancestry gem to realize a hierarchy. A further question is, will be all objects decorated, if I'm using ancestry?