Skip to content

Instantly share code, notes, and snippets.

@derekrockwell
Created June 21, 2013 05:34
Show Gist options
  • Save derekrockwell/5829094 to your computer and use it in GitHub Desktop.
Save derekrockwell/5829094 to your computer and use it in GitHub Desktop.
remove need for prefixing routes within an engine
module DummyEngine
module ApplicationHelper
def method_missing(method, *args, &block)
if (method.to_s.end_with?('_path') || method.to_s.end_with?('_url')) && engine_name.respond_to?(method)
engine_name.send(method, *args)
else
super
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment