Skip to content

Commit

Permalink
Merge pull request #114 from andrewculver/yas4891-main_app-solution
Browse files Browse the repository at this point in the history
getting rid of `main_app` references in layouts
  • Loading branch information
yas4891 committed May 24, 2015
2 parents 09fed7f + 8a03945 commit 7e4e743
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/koudoku/application_controller.rb
Expand Up @@ -2,5 +2,9 @@ module Koudoku
class ApplicationController < ::ApplicationController
layout Koudoku.layout
helper :application

# stolen from http://stackoverflow.com/questions/9232175/access-main-app-helpers-when-overridings-a-rails-engine-view-layout#comment44856124_19453140
# to solve the problem of having to reference "main_app.$some_model_path" in layouts
helper Rails.application.routes.url_helpers
end
end

0 comments on commit 7e4e743

Please sign in to comment.