In Rails, is it possible to namespace models in modules and still get correct behavior from url_for?
For instance, here, url_for works as e
In my case I overridden the url_for method on my application_helper.rb file to add the :network param on all routes from my namespace :mkp.
module ApplicationHelper
def url_for(options = {})
if options.is_a?(Hash) && options.has_key?(:controller)
if options[:network].nil? && options[:controller].match(/^mkp\//).present?
options[:network] = @network.downcase
end
end
super(options)
end
end