title: How can I globally override a rails url helper?
body: <p>I needed to add a simple change to <strong>foo_path</strong>, so I did this:</p>
  
  <pre><code>module ApplicationHelper
    # [...]
  
    def foo_path(foo, options = {})
      options.merge!(bar: foo.some_attribute)
      super
    end
  
    # [...]
  end
  </code></pre>
  
  <p>Now, this works when called from a view, but when called from a controller, the original variant without my additions is used.</p>
  
  <p><strong>How can I override the according helpers (_path/_url) application wide?</strong></p>