Sha256: b5ca36d082ffe6bd60648f152cde0692cd47e67997c8bbc6199d8a8cee44fd8f
Contents?: true
Size: 604 Bytes
Versions: 4
Compression:
Stored size: 604 Bytes
Contents
module Gamification module ApplicationHelper # Knowledge base uses the layout of the client application, which causes Rails' url helpers to get confused # and require you to prepend 'main_app' to your own routes. This hack allows developers to keep referring to # routes without a prefix by sending undefined routes to 'main_app' before failing. def method_missing(method, *args, &block) if (method.to_s.end_with?('_path') || method.to_s.end_with?('_url')) && main_app.respond_to?(method) main_app.send(method, *args) else super end end end end
Version data entries
4 entries across 4 versions & 1 rubygems