title: Rails 4.2 image_path with different url for controller
body: <p>I'm using image_path into my controller:</p>
  
  <pre><code>class ArchivesController &lt; ApplicationController
      include ActionView::Helpers::AssetUrlHelper
  
      def create
          @archive = Archive.new(file: params[:file])
  
          render json: {ico: image_path('docs/pdf.png')}
      end
  end
  </code></pre>
  
  <p>But my return is <code>{ico: '/images/docs/pdf.png'}</code>.</p>
  
  <p>When I'm use <code>image_path('docs/pdf.png')</code> in my views, the url is '/docs/pdf.png' and works.</p>
  
  <p>Why in my controller the url is different?</p>