title: How can I access image_path route helper inside a Rails 3 model?
body: <p>I'm trying to use Sprockets' image_path method from within a Rails 3 model. I've tried including <code>ActionView::Helpers::AssetTagHelper</code> in my model and calling image_path but that does not work (<code>undefined local variable or method 'config'</code>).</p>
  
  <p>Any ideas?</p>
  
  <p><strong>Update - this worked for me:</strong></p>
  
  <pre><code>ActionController::Base.new.view_context.asset_path("image.png")
  </code></pre>