3

I've tried including ActionView::Helpers::AssetTagHelper and then using the image_path() method however it gives me grief:

undefined local variable or method `config' for ActionView::Helpers::AssetTagHelper:Module

There's probably something simple I'm missing. Any ideas?

digitalWestie
  • 2,647
  • 6
  • 28
  • 45

1 Answers1

10

I found the solution in Barlow's answer here: How can I use image_path inside Rails 3 Controller

view_context.image_path('/path/to/image')

seems to work for me, no need to include helpers in the Controller

Community
  • 1
  • 1